diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..412b83e --- /dev/null +++ b/.env.sample @@ -0,0 +1,4 @@ +SAASUS_SECRET_KEY= +SAASUS_API_KEY= +SAASUS_SAAS_ID= +SAASUS_BASE_URL= diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..985567c --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +max-line-length = 120 +max-complexity = 20 + +# openapi-generator で生成されたコードは無視する。 +exclude = ./generated/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9883914..7cedf6b 100644 --- a/.gitignore +++ b/.gitignore @@ -65,5 +65,4 @@ target/ #Ipython Notebook .ipynb_checkpoints .env - -authapi.yml +*.yml \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f870af3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=saasus_sdk_python diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 9ba9612..2d50880 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,284 @@ # saasus-sdk-python +スキーマ -This is a SaaSus SDK for Python +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 3.7+ + +## Installation & Usage +### pip install + +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 +``` +(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 +import saasus_sdk_python +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import saasus_sdk_python +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import time +import saasus_sdk_python +from saasus_sdk_python.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with saasus_sdk_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.AuthInfoApi(api_client) + + try: + # 認証情報を取得(Get Authentication Info) + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthInfoApi* | [**get_auth_info**](docs/AuthInfoApi.md#get_auth_info) | **GET** /auth-info | 認証情報を取得(Get Authentication Info) +*AuthInfoApi* | [**get_identity_providers**](docs/AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | +*AuthInfoApi* | [**get_sign_in_settings**](docs/AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | パスワード要件を取得(Get Password Requirements) +*AuthInfoApi* | [**update_auth_info**](docs/AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | 認証情報を更新(Update Authentication Info) +*AuthInfoApi* | [**update_identity_provider**](docs/AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | +*AuthInfoApi* | [**update_sign_in_settings**](docs/AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | パスワード要件を更新(Update Password Requirements) +*BasicInfoApi* | [**find_notification_messages**](docs/BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | 通知メールテンプレートを取得(Get Notification Email Templates) +*BasicInfoApi* | [**get_basic_info**](docs/BasicInfoApi.md#get_basic_info) | **GET** /basic-info | 基本設定情報の取得(Get Basic Configurations) +*BasicInfoApi* | [**get_customize_page_settings**](docs/BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | 認証認可基本情報取得(Get Authentication Authorization Basic Information) +*BasicInfoApi* | [**get_customize_pages**](docs/BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | 認証系画面設定情報取得(Get Authentication Page Setting) +*BasicInfoApi* | [**update_basic_info**](docs/BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | 基本設定情報の更新(Update Basic Configurations) +*BasicInfoApi* | [**update_customize_page_settings**](docs/BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | 認証認可基本情報更新(Update Authentication Authorization Basic Information) +*BasicInfoApi* | [**update_customize_pages**](docs/BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | 認証系画面設定情報設定(Authentication Page Setting) +*BasicInfoApi* | [**update_notification_messages**](docs/BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | 通知メールテンプレートを更新(Update Notification Email Template) +*CredentialApi* | [**create_auth_credentials**](docs/CredentialApi.md#create_auth_credentials) | **POST** /credentials | 認証・認可情報の保存(Save Authentication/Authorization Information) +*CredentialApi* | [**get_auth_credentials**](docs/CredentialApi.md#get_auth_credentials) | **GET** /credentials | 認証・認可情報の取得(Get Authentication/Authorization Information) +*EnvApi* | [**create_env**](docs/EnvApi.md#create_env) | **POST** /envs | 環境情報を作成(Create Env Info) +*EnvApi* | [**delete_env**](docs/EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | 環境情報を削除(Delete Env Info) +*EnvApi* | [**get_env**](docs/EnvApi.md#get_env) | **GET** /envs/{env_id} | 環境情報を取得(Get Env Details) +*EnvApi* | [**get_envs**](docs/EnvApi.md#get_envs) | **GET** /envs | 環境情報一覧を取得(Get Env Info) +*EnvApi* | [**update_env**](docs/EnvApi.md#update_env) | **PATCH** /envs/{env_id} | 環境情報を更新(Update Env Info) +*ErrorApi* | [**return_internal_server_error**](docs/ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | ステータスコード500でサーバーエラーを返却(Return Internal Server Error) +*RoleApi* | [**create_role**](docs/RoleApi.md#create_role) | **POST** /roles | 役割(ロール)を作成(Create Role) +*RoleApi* | [**delete_role**](docs/RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | 役割(ロール)を削除(Delete Role) +*RoleApi* | [**get_roles**](docs/RoleApi.md#get_roles) | **GET** /roles | 役割(ロール)一覧を取得(Get Roles) +*SaasUserApi* | [**confirm_sign_up_with_aws_marketplace**](docs/SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace) +*SaasUserApi* | [**create_saas_user**](docs/SaasUserApi.md#create_saas_user) | **POST** /users | SaaSにユーザーを作成(Create SaaS User) +*SaasUserApi* | [**create_secret_code**](docs/SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | 認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration) +*SaasUserApi* | [**delete_saas_user**](docs/SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | ユーザー情報を削除(Delete User) +*SaasUserApi* | [**get_saas_user**](docs/SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | ユーザー情報を取得(Get User) +*SaasUserApi* | [**get_saas_users**](docs/SaasUserApi.md#get_saas_users) | **GET** /users | ユーザー一覧を取得(Get Users) +*SaasUserApi* | [**get_user_mfa_preference**](docs/SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | ユーザーのMFA設定を取得(Get User's MFA Settings) +*SaasUserApi* | [**link_aws_marketplace**](docs/SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace) +*SaasUserApi* | [**resend_sign_up_confirmation_email**](docs/SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | 新規登録時の確認メール再送信(Resend Sign Up Confirmation Email) +*SaasUserApi* | [**sign_up**](docs/SaasUserApi.md#sign_up) | **POST** /sign-up | 新規登録(Sign Up) +*SaasUserApi* | [**sign_up_with_aws_marketplace**](docs/SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace) +*SaasUserApi* | [**unlink_provider**](docs/SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | 外部IDプロバイダの連携解除(Unlink external identity providers) +*SaasUserApi* | [**update_saas_user_email**](docs/SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | メールアドレスを変更(Change Email) +*SaasUserApi* | [**update_saas_user_password**](docs/SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | パスワードを変更(Change Password) +*SaasUserApi* | [**update_software_token**](docs/SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | 認証アプリケーションを登録(Register Authentication Application) +*SaasUserApi* | [**update_user_mfa_preference**](docs/SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | ユーザーのMFA設定を更新(Update User's MFA Settings) +*SaasusTenantApi* | [**create_api_key**](docs/SaasusTenantApi.md#create_api_key) | **POST** /apikeys | APIキーを作成(Create API Key) +*SaasusTenantApi* | [**delete_api_key**](docs/SaasusTenantApi.md#delete_api_key) | **DELETE** /apikeys/{api_key} | APIキーを削除(Delete API Key) +*SaasusTenantApi* | [**get_api_keys**](docs/SaasusTenantApi.md#get_api_keys) | **GET** /apikeys | APIキー一覧を取得(Get API Keys) +*SaasusTenantApi* | [**get_client_secret**](docs/SaasusTenantApi.md#get_client_secret) | **GET** /client-secret | クライアントシークレットを取得(Get Client Secret) +*SaasusTenantApi* | [**get_saas_id**](docs/SaasusTenantApi.md#get_saas_id) | **GET** /saasid | SaasIDを取得(Get SaasID) +*SaasusTenantApi* | [**update_client_secret**](docs/SaasusTenantApi.md#update_client_secret) | **PATCH** /client-secret | クライアントシークレットを更新(Update Client Secret) +*SaasusTenantApi* | [**update_saas_id**](docs/SaasusTenantApi.md#update_saas_id) | **PATCH** /saasid | SaasIDを更新(Update SaasID) +*TenantApi* | [**create_tenant**](docs/TenantApi.md#create_tenant) | **POST** /tenants | テナントを作成(Create Tenant) +*TenantApi* | [**create_tenant_and_pricing**](docs/TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | stripe初期設定(Stripe Initial Setting) +*TenantApi* | [**delete_stripe_tenant_and_pricing**](docs/TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe) +*TenantApi* | [**delete_tenant**](docs/TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | テナント情報を削除(Delete Tenant) +*TenantApi* | [**get_tenant**](docs/TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | テナント情報を取得(Get Tenant Details) +*TenantApi* | [**get_tenants**](docs/TenantApi.md#get_tenants) | **GET** /tenants | テナント一覧取得(Get Tenants) +*TenantApi* | [**reset_plan**](docs/TenantApi.md#reset_plan) | **PUT** /plans/reset | プランに関わる情報を全削除 +*TenantApi* | [**update_tenant**](docs/TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | テナント情報を更新(Update Tenant Details) +*TenantApi* | [**update_tenant_billing_info**](docs/TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | テナントの請求先情報を更新(Update Tenant Billing Information) +*TenantApi* | [**update_tenant_plan**](docs/TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | テナントのプラン情報を更新(Update Tenant Plan Information) +*TenantAttributeApi* | [**create_tenant_attribute**](docs/TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | テナント属性の作成(Create Tenant Attribute) +*TenantAttributeApi* | [**delete_tenant_attribute**](docs/TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | テナント属性の削除(Delete Tenant Attribute) +*TenantAttributeApi* | [**get_tenant_attributes**](docs/TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | テナント属性の一覧を取得(Get Tenant Attributes) +*TenantUserApi* | [**create_tenant_user**](docs/TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | テナントにユーザーを作成(Create Tenant User) +*TenantUserApi* | [**create_tenant_user_roles**](docs/TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role) +*TenantUserApi* | [**delete_tenant_user**](docs/TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | テナントのユーザー情報を削除(Delete Tenant User) +*TenantUserApi* | [**delete_tenant_user_role**](docs/TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User) +*TenantUserApi* | [**get_all_tenant_user**](docs/TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | ユーザー情報を取得(Get User Info) +*TenantUserApi* | [**get_all_tenant_users**](docs/TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | ユーザー一覧を取得(Get Users) +*TenantUserApi* | [**get_tenant_user**](docs/TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | テナントのユーザー情報を取得(Get Tenant User) +*TenantUserApi* | [**get_tenant_users**](docs/TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | テナントのユーザー一覧を取得(Get Tenant Users) +*TenantUserApi* | [**update_tenant_user**](docs/TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | テナントのユーザー属性情報を更新(Update Tenant User Attribute) +*UserAttributeApi* | [**create_user_attribute**](docs/UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | ユーザー属性の作成(Create User Attributes) +*UserAttributeApi* | [**delete_user_attribute**](docs/UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | ユーザー属性の削除(Delete User Attribute) +*UserAttributeApi* | [**get_user_attributes**](docs/UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | ユーザー属性の一覧を取得(Get User Attributes) +*UserInfoApi* | [**get_user_info**](docs/UserInfoApi.md#get_user_info) | **GET** /userinfo | ユーザー情報取得(Get User Info) + + +## Documentation For Models + + - [AccountVerification](docs/AccountVerification.md) + - [ApiKeys](docs/ApiKeys.md) + - [Attribute](docs/Attribute.md) + - [AttributeType](docs/AttributeType.md) + - [AuthInfo](docs/AuthInfo.md) + - [AuthorizationTempCode](docs/AuthorizationTempCode.md) + - [BasicInfo](docs/BasicInfo.md) + - [BillingAddress](docs/BillingAddress.md) + - [BillingInfo](docs/BillingInfo.md) + - [ClientSecret](docs/ClientSecret.md) + - [ConfirmSignUpWithAwsMarketplaceParam](docs/ConfirmSignUpWithAwsMarketplaceParam.md) + - [CreateSaasUserParam](docs/CreateSaasUserParam.md) + - [CreateSecretCodeParam](docs/CreateSecretCodeParam.md) + - [CreateTenantUserParam](docs/CreateTenantUserParam.md) + - [CreateTenantUserRolesParam](docs/CreateTenantUserRolesParam.md) + - [Credentials](docs/Credentials.md) + - [CustomizePageProps](docs/CustomizePageProps.md) + - [CustomizePageSettings](docs/CustomizePageSettings.md) + - [CustomizePageSettingsProps](docs/CustomizePageSettingsProps.md) + - [CustomizePages](docs/CustomizePages.md) + - [DeviceConfiguration](docs/DeviceConfiguration.md) + - [DnsRecord](docs/DnsRecord.md) + - [Env](docs/Env.md) + - [Envs](docs/Envs.md) + - [Error](docs/Error.md) + - [IdentityProviderConfiguration](docs/IdentityProviderConfiguration.md) + - [IdentityProviderProps](docs/IdentityProviderProps.md) + - [IdentityProviders](docs/IdentityProviders.md) + - [InvoiceLanguage](docs/InvoiceLanguage.md) + - [LinkAwsMarketplaceParam](docs/LinkAwsMarketplaceParam.md) + - [MessageTemplate](docs/MessageTemplate.md) + - [MfaConfiguration](docs/MfaConfiguration.md) + - [MfaPreference](docs/MfaPreference.md) + - [NotificationMessages](docs/NotificationMessages.md) + - [PasswordPolicy](docs/PasswordPolicy.md) + - [PlanHistories](docs/PlanHistories.md) + - [PlanHistory](docs/PlanHistory.md) + - [PlanReservation](docs/PlanReservation.md) + - [ProviderName](docs/ProviderName.md) + - [RecaptchaProps](docs/RecaptchaProps.md) + - [ResendSignUpConfirmationEmailParam](docs/ResendSignUpConfirmationEmailParam.md) + - [Role](docs/Role.md) + - [Roles](docs/Roles.md) + - [SaasId](docs/SaasId.md) + - [SaasUser](docs/SaasUser.md) + - [SaasUsers](docs/SaasUsers.md) + - [SelfRegist](docs/SelfRegist.md) + - [SignInSettings](docs/SignInSettings.md) + - [SignUpParam](docs/SignUpParam.md) + - [SignUpWithAwsMarketplaceParam](docs/SignUpWithAwsMarketplaceParam.md) + - [SoftwareTokenSecretCode](docs/SoftwareTokenSecretCode.md) + - [Tenant](docs/Tenant.md) + - [TenantAttributes](docs/TenantAttributes.md) + - [TenantDetail](docs/TenantDetail.md) + - [TenantProps](docs/TenantProps.md) + - [Tenants](docs/Tenants.md) + - [UpdateBasicInfoParam](docs/UpdateBasicInfoParam.md) + - [UpdateCustomizePageSettingsParam](docs/UpdateCustomizePageSettingsParam.md) + - [UpdateCustomizePagesParam](docs/UpdateCustomizePagesParam.md) + - [UpdateEnvParam](docs/UpdateEnvParam.md) + - [UpdateIdentityProviderParam](docs/UpdateIdentityProviderParam.md) + - [UpdateNotificationMessagesParam](docs/UpdateNotificationMessagesParam.md) + - [UpdateSaasUserEmailParam](docs/UpdateSaasUserEmailParam.md) + - [UpdateSaasUserPasswordParam](docs/UpdateSaasUserPasswordParam.md) + - [UpdateSignInSettingsParam](docs/UpdateSignInSettingsParam.md) + - [UpdateSoftwareTokenParam](docs/UpdateSoftwareTokenParam.md) + - [UpdateTenantUserParam](docs/UpdateTenantUserParam.md) + - [User](docs/User.md) + - [UserAttributes](docs/UserAttributes.md) + - [UserAvailableEnv](docs/UserAvailableEnv.md) + - [UserAvailableTenant](docs/UserAvailableTenant.md) + - [UserInfo](docs/UserInfo.md) + - [Users](docs/Users.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### Bearer + +- **Type**: Bearer authentication + + +## Author + +--- + +## 新しいモジュールの追加方法 + +例えばhogeモジュールを追加したい時 + +1. モジュールのymlファイルをsaasus_sdk_python直下に配置する +2. `generate.sh`のMODULESにモジュール名を追加する +```shell +MODULES=("auth" "pricing" "billing" "hoge") +``` +3. `hoge_client.py`を`saasus_sdk_python/client`配下に作成する + 1. auth_client.pyはconfiguration.default_headersがなかったりして少し特殊なため**pricing_client.py**をコピーして作成するのが望ましい + 2. 適宜Client名を変更する + 3. hoge_client.pyを一部修正する +```python + # このhost名を修正 + self.configuration.host = f"{self.base_url}/hoge" +``` +4. 必要に応じてSDK呼び出し側のサンプル(__main__.py)も変更する + -## How to use -See the documentation [Implementation sample](https://github.com/saasus-platform/implementation-sample-api-python/) diff --git a/SDK/auth_client.py b/SDK/auth_client.py new file mode 100644 index 0000000..bc3ae27 --- /dev/null +++ b/SDK/auth_client.py @@ -0,0 +1,40 @@ +import hashlib +import hmac +import os +import time +from typing import Any +from urllib.parse import urlparse + +import requests +from dotenv import load_dotenv + +load_dotenv() + + +class AuthClient: + def __init__(self) -> None: + self.api_key = os.getenv("SAASUS_API_KEY", "") + self.secret_key = os.getenv("SAASUS_SECRET_KEY", "") + self.saas_id = os.getenv("SAASUS_SAAS_ID", "") + self.base_url = os.getenv("SAASUS_BASE_URL", "http://localhost:8080/v1") + + # 認証用の署名を生成する + def _generate_signature(self, method: str, url: str, body: str | None = None) -> str: + literal = "SAASUSSIGV1" + now = time.strftime("%Y%m%d%H%M", time.gmtime()) + parsed_url = urlparse(url) + host_and_path = parsed_url.netloc + parsed_url.path + msg = now + self.api_key + method.upper() + host_and_path + (body if body is not None else "") + signature_hmac = hmac.new(self.secret_key.encode(), msg=msg.encode(), digestmod=hashlib.sha256) + return "{} Sig={}, SaaSID={}, APIKey={}".format(literal, signature_hmac.hexdigest(), self.saas_id, self.api_key) + + # basic-info APIにGETリクエストを送信する + def basic_info(self) -> dict[str, Any]: + url = f"{self.base_url}/auth/basic-info" + method = "GET" + signature = self._generate_signature(method, url) + headers = { + "Authorization": signature, + } + response = requests.get(url, headers=headers) + return response.json() diff --git a/docs/AccountVerification.md b/docs/AccountVerification.md deleted file mode 100644 index 383cf51..0000000 --- a/docs/AccountVerification.md +++ /dev/null @@ -1,30 +0,0 @@ -# AccountVerification - -アカウント認証設定(account authentication settings) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**verification_method** | **str** | code: 検証コード(verification code) link: 検証リンク(verification link) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) | -**sending_to** | **str** | email: Eメール(e-mail) sms: SMS smsOrEmail: SMS不可の場合にEメール(email if SMS is not possible) | - -## Example - -```python -from saasus_sdk_python.models.account_verification import AccountVerification - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountVerification from a JSON string -account_verification_instance = AccountVerification.from_json(json) -# print the JSON string representation of the object -print AccountVerification.to_json() - -# convert the object into a dict -account_verification_dict = account_verification_instance.to_dict() -# create an instance of AccountVerification from a dict -account_verification_form_dict = account_verification.from_dict(account_verification_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/ApiKeys.md b/docs/ApiKeys.md deleted file mode 100644 index c73dfdd..0000000 --- a/docs/ApiKeys.md +++ /dev/null @@ -1,28 +0,0 @@ -# ApiKeys - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_keys** | **List[str]** | APIキー(API Key) | - -## Example - -```python -from saasus_sdk_python.models.api_keys import ApiKeys - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiKeys from a JSON string -api_keys_instance = ApiKeys.from_json(json) -# print the JSON string representation of the object -print ApiKeys.to_json() - -# convert the object into a dict -api_keys_dict = api_keys_instance.to_dict() -# create an instance of ApiKeys from a dict -api_keys_form_dict = api_keys.from_dict(api_keys_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/Attribute.md b/docs/Attribute.md deleted file mode 100644 index e36a561..0000000 --- a/docs/Attribute.md +++ /dev/null @@ -1,30 +0,0 @@ -# Attribute - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attribute_name** | **str** | 属性名(attribute name) | -**display_name** | **str** | 表示名(display name) | -**attribute_type** | [**AttributeType**](AttributeType.md) | | - -## Example - -```python -from saasus_sdk_python.models.attribute import Attribute - -# TODO update the JSON string below -json = "{}" -# create an instance of Attribute from a JSON string -attribute_instance = Attribute.from_json(json) -# print the JSON string representation of the object -print Attribute.to_json() - -# convert the object into a dict -attribute_dict = attribute_instance.to_dict() -# create an instance of Attribute from a dict -attribute_form_dict = attribute.from_dict(attribute_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/AttributeType.md b/docs/AttributeType.md deleted file mode 100644 index a0c1118..0000000 --- a/docs/AttributeType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AttributeType - -型(dateはYYYY-MM-DDの形式で使用する事ができます。) (Type (date can be set to YYYY-MM-DD format.)) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/AuthInfo.md b/docs/AuthInfo.md deleted file mode 100644 index cb90efa..0000000 --- a/docs/AuthInfo.md +++ /dev/null @@ -1,28 +0,0 @@ -# AuthInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**callback_url** | **str** | 認証後遷移先(Redirect After Authentication) | - -## Example - -```python -from saasus_sdk_python.models.auth_info import AuthInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthInfo from a JSON string -auth_info_instance = AuthInfo.from_json(json) -# print the JSON string representation of the object -print AuthInfo.to_json() - -# convert the object into a dict -auth_info_dict = auth_info_instance.to_dict() -# create an instance of AuthInfo from a dict -auth_info_form_dict = auth_info.from_dict(auth_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/AuthInfoApi.md b/docs/AuthInfoApi.md deleted file mode 100644 index 2c00663..0000000 --- a/docs/AuthInfoApi.md +++ /dev/null @@ -1,462 +0,0 @@ -# saasus_sdk_python.AuthInfoApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | 認証情報を取得(Get Authentication Info) -[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | -[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | パスワード要件を取得(Get Password Requirements) -[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | 認証情報を更新(Update Authentication Info) -[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | -[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | パスワード要件を更新(Update Password Requirements) - - -# **get_auth_info** -> AuthInfo get_auth_info() - -認証情報を取得(Get Authentication Info) - -ログイン後に認証情報を渡す SaaS の URL を取得します。 ここで取得した URL へ認証情報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。 Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.auth_info import AuthInfo -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.AuthInfoApi(api_client) - - try: - # 認証情報を取得(Get Authentication Info) - api_response = api_instance.get_auth_info() - print("The response of AuthInfoApi->get_auth_info:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AuthInfo**](AuthInfo.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_identity_providers** -> IdentityProviders get_identity_providers() - - - -cognitoに設定している外部プロバイダ経由のサインイン情報取得 Get sign-in information via external provider set in cognito - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.identity_providers import IdentityProviders -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.AuthInfoApi(api_client) - - try: - api_response = api_instance.get_identity_providers() - print("The response of AuthInfoApi->get_identity_providers:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**IdentityProviders**](IdentityProviders.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_sign_in_settings** -> SignInSettings get_sign_in_settings() - -パスワード要件を取得(Get Password Requirements) - -ユーザーパスワードの要件設定を取得します。 アルファベット、数字、記号の組み合わせで、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります。 Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.sign_in_settings import SignInSettings -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.AuthInfoApi(api_client) - - try: - # パスワード要件を取得(Get Password Requirements) - api_response = api_instance.get_sign_in_settings() - print("The response of AuthInfoApi->get_sign_in_settings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SignInSettings**](SignInSettings.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_auth_info** -> update_auth_info(body=body) - -認証情報を更新(Update Authentication Info) - -ログイン後に認証情報を渡す SaaS の URL を登録します。 ここで登録した URL に認証情報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。 Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.auth_info import AuthInfo -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.AuthInfoApi(api_client) - body = saasus_sdk_python.AuthInfo() # AuthInfo | (optional) - - try: - # 認証情報を更新(Update Authentication Info) - api_instance.update_auth_info(body=body) - except Exception as e: - print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **AuthInfo**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_identity_provider** -> update_identity_provider(update_identity_provider_param=update_identity_provider_param) - - - -外部IDプロバイダのサインイン情報更新 - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_identity_provider_param import UpdateIdentityProviderParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.AuthInfoApi(api_client) - update_identity_provider_param = saasus_sdk_python.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) - - try: - api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) - except Exception as e: - print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_sign_in_settings** -> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) - -パスワード要件を更新(Update Password Requirements) - -ユーザーパスワードの要件設定を更新します。 アルファベット、数字、記号の組み合わせで、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります。 Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_sign_in_settings_param import UpdateSignInSettingsParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.AuthInfoApi(api_client) - update_sign_in_settings_param = saasus_sdk_python.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) - - try: - # パスワード要件を更新(Update Password Requirements) - api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) - except Exception as e: - print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/AuthorizationTempCode.md b/docs/AuthorizationTempCode.md deleted file mode 100644 index 5ccf8a0..0000000 --- a/docs/AuthorizationTempCode.md +++ /dev/null @@ -1,28 +0,0 @@ -# AuthorizationTempCode - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | | - -## Example - -```python -from saasus_sdk_python.models.authorization_temp_code import AuthorizationTempCode - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthorizationTempCode from a JSON string -authorization_temp_code_instance = AuthorizationTempCode.from_json(json) -# print the JSON string representation of the object -print AuthorizationTempCode.to_json() - -# convert the object into a dict -authorization_temp_code_dict = authorization_temp_code_instance.to_dict() -# create an instance of AuthorizationTempCode from a dict -authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/BasicInfo.md b/docs/BasicInfo.md deleted file mode 100644 index af7b1c3..0000000 --- a/docs/BasicInfo.md +++ /dev/null @@ -1,36 +0,0 @@ -# BasicInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**domain_name** | **str** | ドメイン名(Domain Name) | -**is_dns_validated** | **bool** | DNSレコードの検証結果(DNS Record Verification Results) | -**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | -**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | -**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS レコード(DKIM DNS Records) | -**default_domain_name** | **str** | デフォルトドメイン名(Default Domain Name) | -**from_email_address** | **str** | 認証メールの送信元メールアドレス(Sender Email for Authentication Email) | -**reply_email_address** | **str** | 認証メールの返信元メールアドレス(Reply-from email address of authentication email) | -**is_ses_sandbox_granted** | **bool** | SESのサンドボックス解除及びCognitoのSES設定結果(SES sandbox release and Cognito SES configuration results) | - -## Example - -```python -from saasus_sdk_python.models.basic_info import BasicInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of BasicInfo from a JSON string -basic_info_instance = BasicInfo.from_json(json) -# print the JSON string representation of the object -print BasicInfo.to_json() - -# convert the object into a dict -basic_info_dict = basic_info_instance.to_dict() -# create an instance of BasicInfo from a dict -basic_info_form_dict = basic_info.from_dict(basic_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/BasicInfoApi.md b/docs/BasicInfoApi.md deleted file mode 100644 index ccd45db..0000000 --- a/docs/BasicInfoApi.md +++ /dev/null @@ -1,616 +0,0 @@ -# saasus_sdk_python.BasicInfoApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | 通知メールテンプレートを取得(Get Notification Email Templates) -[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | 基本設定情報の取得(Get Basic Configurations) -[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | 認証認可基本情報取得(Get Authentication Authorization Basic Information) -[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | 認証系画面設定情報取得(Get Authentication Page Setting) -[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | 基本設定情報の更新(Update Basic Configurations) -[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | 認証認可基本情報更新(Update Authentication Authorization Basic Information) -[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | 認証系画面設定情報設定(Authentication Page Setting) -[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | 通知メールテンプレートを更新(Update Notification Email Template) - - -# **find_notification_messages** -> NotificationMessages find_notification_messages() - -通知メールテンプレートを取得(Get Notification Email Templates) - -各種通知メールテンプレートを取得します。 Get notification email templates. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.notification_messages import NotificationMessages -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - - try: - # 通知メールテンプレートを取得(Get Notification Email Templates) - api_response = api_instance.find_notification_messages() - print("The response of BasicInfoApi->find_notification_messages:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**NotificationMessages**](NotificationMessages.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_basic_info** -> BasicInfo get_basic_info() - -基本設定情報の取得(Get Basic Configurations) - -SaaS ID を元に設定されているドメイン名と CNAME レコードを取得します。 取得した CNAME レコードを DNS に設定することで、ログイン画面を生成します。 Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.basic_info import BasicInfo -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - - try: - # 基本設定情報の取得(Get Basic Configurations) - api_response = api_instance.get_basic_info() - print("The response of BasicInfoApi->get_basic_info:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**BasicInfo**](BasicInfo.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_customize_page_settings** -> CustomizePageSettings get_customize_page_settings() - -認証認可基本情報取得(Get Authentication Authorization Basic Information) - -認証認可基本情報を取得します。 Get authentication authorization basic information. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.customize_page_settings import CustomizePageSettings -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - - try: - # 認証認可基本情報取得(Get Authentication Authorization Basic Information) - api_response = api_instance.get_customize_page_settings() - print("The response of BasicInfoApi->get_customize_page_settings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CustomizePageSettings**](CustomizePageSettings.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_customize_pages** -> CustomizePages get_customize_pages() - -認証系画面設定情報取得(Get Authentication Page Setting) - -認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を取得します。 Get the authentication screen setting information (new registration, login, password reset, etc.). - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.customize_pages import CustomizePages -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - - try: - # 認証系画面設定情報取得(Get Authentication Page Setting) - api_response = api_instance.get_customize_pages() - print("The response of BasicInfoApi->get_customize_pages:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CustomizePages**](CustomizePages.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_basic_info** -> update_basic_info(update_basic_info_param=update_basic_info_param) - -基本設定情報の更新(Update Basic Configurations) - -SaaS ID を元にパラメータとして設定したドメイン名を設定更新します。 CNAME レコードが生成されますので、 DNS に設定して下さい。 既に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。 Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_basic_info_param import UpdateBasicInfoParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - update_basic_info_param = saasus_sdk_python.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) - - try: - # 基本設定情報の更新(Update Basic Configurations) - api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) - except Exception as e: - print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_customize_page_settings** -> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) - -認証認可基本情報更新(Update Authentication Authorization Basic Information) - -認証認可基本情報を更新します。 Update authentication authorization basic information. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - update_customize_page_settings_param = saasus_sdk_python.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) - - try: - # 認証認可基本情報更新(Update Authentication Authorization Basic Information) - api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) - except Exception as e: - print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_customize_pages** -> update_customize_pages(update_customize_pages_param=update_customize_pages_param) - -認証系画面設定情報設定(Authentication Page Setting) - -認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を更新します。 Update the authentication page setting information (new registration, login, password reset, etc.). - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_customize_pages_param import UpdateCustomizePagesParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - update_customize_pages_param = saasus_sdk_python.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) - - try: - # 認証系画面設定情報設定(Authentication Page Setting) - api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) - except Exception as e: - print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_notification_messages** -> update_notification_messages(update_notification_messages_param=update_notification_messages_param) - -通知メールテンプレートを更新(Update Notification Email Template) - -各種通知メールテンプレート更新します。 Update notification email template. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_notification_messages_param import UpdateNotificationMessagesParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.BasicInfoApi(api_client) - update_notification_messages_param = saasus_sdk_python.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) - - try: - # 通知メールテンプレートを更新(Update Notification Email Template) - api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) - except Exception as e: - print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/BillingAddress.md b/docs/BillingAddress.md deleted file mode 100644 index 97eecbe..0000000 --- a/docs/BillingAddress.md +++ /dev/null @@ -1,33 +0,0 @@ -# BillingAddress - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**street** | **str** | 住所の通りの名前や番地を含めた部分 Street address, apartment or suite number. | -**city** | **str** | 住所の市区町村 City, district, suburb, town, or village. | -**state** | **str** | 住所の都道府県または州 State name or abbreviation. | -**country** | **str** | 住所の国を ISO 3166-1 alpha-2 コードで指定します。 Country of the address using ISO 3166-1 alpha-2 code. | -**additional_address_info** | **str** | 建物名・部屋番号などの住所に関する追加情報 Additional information about the address, such as a building name, floor, or department name. | [optional] -**postal_code** | **str** | 郵便番号 ZIP or postal code. | - -## Example - -```python -from saasus_sdk_python.models.billing_address import BillingAddress - -# TODO update the JSON string below -json = "{}" -# create an instance of BillingAddress from a JSON string -billing_address_instance = BillingAddress.from_json(json) -# print the JSON string representation of the object -print BillingAddress.to_json() - -# convert the object into a dict -billing_address_dict = billing_address_instance.to_dict() -# create an instance of BillingAddress from a dict -billing_address_form_dict = billing_address.from_dict(billing_address_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/BillingInfo.md b/docs/BillingInfo.md deleted file mode 100644 index 47a6864..0000000 --- a/docs/BillingInfo.md +++ /dev/null @@ -1,30 +0,0 @@ -# BillingInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | 請求用のテナント名 Tenant name for billing | -**address** | [**BillingAddress**](BillingAddress.md) | | -**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | - -## Example - -```python -from saasus_sdk_python.models.billing_info import BillingInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of BillingInfo from a JSON string -billing_info_instance = BillingInfo.from_json(json) -# print the JSON string representation of the object -print BillingInfo.to_json() - -# convert the object into a dict -billing_info_dict = billing_info_instance.to_dict() -# create an instance of BillingInfo from a dict -billing_info_form_dict = billing_info.from_dict(billing_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/ClientSecret.md b/docs/ClientSecret.md deleted file mode 100644 index 85f0ef7..0000000 --- a/docs/ClientSecret.md +++ /dev/null @@ -1,28 +0,0 @@ -# ClientSecret - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_secret** | **str** | クライアントシークレット(client secret) | - -## Example - -```python -from saasus_sdk_python.models.client_secret import ClientSecret - -# TODO update the JSON string below -json = "{}" -# create an instance of ClientSecret from a JSON string -client_secret_instance = ClientSecret.from_json(json) -# print the JSON string representation of the object -print ClientSecret.to_json() - -# convert the object into a dict -client_secret_dict = client_secret_instance.to_dict() -# create an instance of ClientSecret from a dict -client_secret_form_dict = client_secret.from_dict(client_secret_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/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/ConfirmSignUpWithAwsMarketplaceParam.md deleted file mode 100644 index 2d3e168..0000000 --- a/docs/ConfirmSignUpWithAwsMarketplaceParam.md +++ /dev/null @@ -1,30 +0,0 @@ -# ConfirmSignUpWithAwsMarketplaceParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tenant_name** | **str** | テナント名(tenant name) | [optional] -**access_token** | **str** | アクセストークン(access token) | -**registration_token** | **str** | Registration Token | - -## Example - -```python -from saasus_sdk_python.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam - -# TODO update the JSON string below -json = "{}" -# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string -confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) -# print the JSON string representation of the object -print ConfirmSignUpWithAwsMarketplaceParam.to_json() - -# convert the object into a dict -confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() -# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict -confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/CreateSaasUserParam.md b/docs/CreateSaasUserParam.md deleted file mode 100644 index 6516b22..0000000 --- a/docs/CreateSaasUserParam.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateSaasUserParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | メールアドレス(E-mail) | -**password** | **str** | パスワード(Password) | - -## Example - -```python -from saasus_sdk_python.models.create_saas_user_param import CreateSaasUserParam - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateSaasUserParam from a JSON string -create_saas_user_param_instance = CreateSaasUserParam.from_json(json) -# print the JSON string representation of the object -print CreateSaasUserParam.to_json() - -# convert the object into a dict -create_saas_user_param_dict = create_saas_user_param_instance.to_dict() -# create an instance of CreateSaasUserParam from a dict -create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/CreateSecretCodeParam.md b/docs/CreateSecretCodeParam.md deleted file mode 100644 index 5354455..0000000 --- a/docs/CreateSecretCodeParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# CreateSecretCodeParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_token** | **str** | アクセストークン(access token) | - -## Example - -```python -from saasus_sdk_python.models.create_secret_code_param import CreateSecretCodeParam - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateSecretCodeParam from a JSON string -create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) -# print the JSON string representation of the object -print CreateSecretCodeParam.to_json() - -# convert the object into a dict -create_secret_code_param_dict = create_secret_code_param_instance.to_dict() -# create an instance of CreateSecretCodeParam from a dict -create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/CreateTenantUserParam.md b/docs/CreateTenantUserParam.md deleted file mode 100644 index 595aa00..0000000 --- a/docs/CreateTenantUserParam.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateTenantUserParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | メールアドレス(e-mail) | -**attributes** | **Dict[str, object]** | 属性情報(SaaS 開発コンソールでユーザー属性定義を行い設定された情報を取得します) Attribute information (Get information set by defining user attributes in the SaaS development console) | - -## Example - -```python -from saasus_sdk_python.models.create_tenant_user_param import CreateTenantUserParam - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTenantUserParam from a JSON string -create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) -# print the JSON string representation of the object -print CreateTenantUserParam.to_json() - -# convert the object into a dict -create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() -# create an instance of CreateTenantUserParam from a dict -create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/CreateTenantUserRolesParam.md b/docs/CreateTenantUserRolesParam.md deleted file mode 100644 index 2601209..0000000 --- a/docs/CreateTenantUserRolesParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# CreateTenantUserRolesParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**role_names** | **List[str]** | 役割(ロール)情報(Role Info) | - -## Example - -```python -from saasus_sdk_python.models.create_tenant_user_roles_param import CreateTenantUserRolesParam - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTenantUserRolesParam from a JSON string -create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) -# print the JSON string representation of the object -print CreateTenantUserRolesParam.to_json() - -# convert the object into a dict -create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() -# create an instance of CreateTenantUserRolesParam from a dict -create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/CredentialApi.md b/docs/CredentialApi.md deleted file mode 100644 index 0d60bba..0000000 --- a/docs/CredentialApi.md +++ /dev/null @@ -1,174 +0,0 @@ -# saasus_sdk_python.CredentialApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | 認証・認可情報の保存(Save Authentication/Authorization Information) -[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | 認証・認可情報の取得(Get Authentication/Authorization Information) - - -# **create_auth_credentials** -> AuthorizationTempCode create_auth_credentials(body=body) - -認証・認可情報の保存(Save Authentication/Authorization Information) - -引数のIDトークン・アクセストークン・リフレッシュトークンを一時保存し取得用の一時コードを返却する。 一時コードの有効期間は発行から10秒です。 Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.authorization_temp_code import AuthorizationTempCode -from saasus_sdk_python.models.credentials import Credentials -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.CredentialApi(api_client) - body = saasus_sdk_python.Credentials() # Credentials | (optional) - - try: - # 認証・認可情報の保存(Save Authentication/Authorization Information) - api_response = api_instance.create_auth_credentials(body=body) - print("The response of CredentialApi->create_auth_credentials:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Credentials**| | [optional] - -### Return type - -[**AuthorizationTempCode**](AuthorizationTempCode.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_auth_credentials** -> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) - -認証・認可情報の取得(Get Authentication/Authorization Information) - -一時コードまたはリフレッシュトークンを利用してIDトークン・アクセストークン・リフレッシュトークンを取得する。 Get ID token, access token, and refresh token using a temporary code or a refresh token. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.credentials import Credentials -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.CredentialApi(api_client) - code = 'code_example' # str | 一時コード(Temp Code) (optional) - auth_flow = 'auth_flow_example' # str | 認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得 指定されていない場合は tempCodeAuth になります (optional) - refresh_token = 'refresh_token_example' # str | リフレッシュトークン(Refresh Token) (optional) - - try: - # 認証・認可情報の取得(Get Authentication/Authorization Information) - api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) - print("The response of CredentialApi->get_auth_credentials:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **code** | **str**| 一時コード(Temp Code) | [optional] - **auth_flow** | **str**| 認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得 指定されていない場合は tempCodeAuth になります | [optional] - **refresh_token** | **str**| リフレッシュトークン(Refresh Token) | [optional] - -### Return type - -[**Credentials**](Credentials.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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/Credentials.md b/docs/Credentials.md deleted file mode 100644 index 733b5c9..0000000 --- a/docs/Credentials.md +++ /dev/null @@ -1,30 +0,0 @@ -# Credentials - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id_token** | **str** | IDトークン(ID token) | -**access_token** | **str** | アクセストークン(access token) | -**refresh_token** | **str** | リフレッシュトークン(refresh token) | [optional] - -## Example - -```python -from saasus_sdk_python.models.credentials import Credentials - -# TODO update the JSON string below -json = "{}" -# create an instance of Credentials from a JSON string -credentials_instance = Credentials.from_json(json) -# print the JSON string representation of the object -print Credentials.to_json() - -# convert the object into a dict -credentials_dict = credentials_instance.to_dict() -# create an instance of Credentials from a dict -credentials_form_dict = credentials.from_dict(credentials_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/CustomizePageProps.md b/docs/CustomizePageProps.md deleted file mode 100644 index cd05102..0000000 --- a/docs/CustomizePageProps.md +++ /dev/null @@ -1,30 +0,0 @@ -# CustomizePageProps - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**html_contents** | **str** | 画面のHTMLを編集できます ※ 未提供の機能のため、変更・保存はできません Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | -**is_terms_of_service** | **bool** | 利用規約の同意チェックボックスを表示するが設定されているか(display the terms of use agreement check box) | -**is_privacy_policy** | **bool** | プライバシーポリシーチェックボックスを表示するが設定されているか(show the privacy policy checkbox) | - -## Example - -```python -from saasus_sdk_python.models.customize_page_props import CustomizePageProps - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomizePageProps from a JSON string -customize_page_props_instance = CustomizePageProps.from_json(json) -# print the JSON string representation of the object -print CustomizePageProps.to_json() - -# convert the object into a dict -customize_page_props_dict = customize_page_props_instance.to_dict() -# create an instance of CustomizePageProps from a dict -customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/CustomizePageSettings.md b/docs/CustomizePageSettings.md deleted file mode 100644 index f80b9a8..0000000 --- a/docs/CustomizePageSettings.md +++ /dev/null @@ -1,33 +0,0 @@ -# CustomizePageSettings - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | サービス名(service name) | -**terms_of_service_url** | **str** | 利用規約URL(terms of service URL) | -**privacy_policy_url** | **str** | プライバシーポリシーURL(privacy policy URL) | -**google_tag_manager_container_id** | **str** | Google Tag Manager コンテナ ID(Google Tag Manager container ID) | -**icon** | **str** | サービスアイコン(service icon) | -**favicon** | **str** | ファビコン(favicon) | - -## Example - -```python -from saasus_sdk_python.models.customize_page_settings import CustomizePageSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomizePageSettings from a JSON string -customize_page_settings_instance = CustomizePageSettings.from_json(json) -# print the JSON string representation of the object -print CustomizePageSettings.to_json() - -# convert the object into a dict -customize_page_settings_dict = customize_page_settings_instance.to_dict() -# create an instance of CustomizePageSettings from a dict -customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/CustomizePageSettingsProps.md b/docs/CustomizePageSettingsProps.md deleted file mode 100644 index 8e891dd..0000000 --- a/docs/CustomizePageSettingsProps.md +++ /dev/null @@ -1,31 +0,0 @@ -# CustomizePageSettingsProps - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | サービス名(service name) | -**terms_of_service_url** | **str** | 利用規約URL(terms of service URL) | -**privacy_policy_url** | **str** | プライバシーポリシーURL(privacy policy URL) | -**google_tag_manager_container_id** | **str** | Google Tag Manager コンテナ ID(Google Tag Manager container ID) | - -## Example - -```python -from saasus_sdk_python.models.customize_page_settings_props import CustomizePageSettingsProps - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomizePageSettingsProps from a JSON string -customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) -# print the JSON string representation of the object -print CustomizePageSettingsProps.to_json() - -# convert the object into a dict -customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() -# create an instance of CustomizePageSettingsProps from a dict -customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/CustomizePages.md b/docs/CustomizePages.md deleted file mode 100644 index 74867c3..0000000 --- a/docs/CustomizePages.md +++ /dev/null @@ -1,30 +0,0 @@ -# CustomizePages - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | -**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | -**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | - -## Example - -```python -from saasus_sdk_python.models.customize_pages import CustomizePages - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomizePages from a JSON string -customize_pages_instance = CustomizePages.from_json(json) -# print the JSON string representation of the object -print CustomizePages.to_json() - -# convert the object into a dict -customize_pages_dict = customize_pages_instance.to_dict() -# create an instance of CustomizePages from a dict -customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/DeviceConfiguration.md b/docs/DeviceConfiguration.md deleted file mode 100644 index 55a82fb..0000000 --- a/docs/DeviceConfiguration.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeviceConfiguration - -信頼済みデバイスの記憶の設定(settings for remembering trusted devices) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**device_remembering** | **str** | always: 常に記憶する(always remember) userOptIn: ユーザーオプトイン(user opt-in) no: (don't save) | - -## Example - -```python -from saasus_sdk_python.models.device_configuration import DeviceConfiguration - -# TODO update the JSON string below -json = "{}" -# create an instance of DeviceConfiguration from a JSON string -device_configuration_instance = DeviceConfiguration.from_json(json) -# print the JSON string representation of the object -print DeviceConfiguration.to_json() - -# convert the object into a dict -device_configuration_dict = device_configuration_instance.to_dict() -# create an instance of DeviceConfiguration from a dict -device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/DnsRecord.md b/docs/DnsRecord.md deleted file mode 100644 index b47d00b..0000000 --- a/docs/DnsRecord.md +++ /dev/null @@ -1,30 +0,0 @@ -# DnsRecord - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | CNAMEリソースレコード(CNAME Resource Record) | -**name** | **str** | レコード名(Record Name) | -**value** | **str** | 値(Value) | - -## Example - -```python -from saasus_sdk_python.models.dns_record import DnsRecord - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsRecord from a JSON string -dns_record_instance = DnsRecord.from_json(json) -# print the JSON string representation of the object -print DnsRecord.to_json() - -# convert the object into a dict -dns_record_dict = dns_record_instance.to_dict() -# create an instance of DnsRecord from a dict -dns_record_form_dict = dns_record.from_dict(dns_record_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/Env.md b/docs/Env.md deleted file mode 100644 index 477ce32..0000000 --- a/docs/Env.md +++ /dev/null @@ -1,30 +0,0 @@ -# Env - -環境情報(env info) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | 環境名(env name) | - -## Example - -```python -from saasus_sdk_python.models.env import Env - -# TODO update the JSON string below -json = "{}" -# create an instance of Env from a JSON string -env_instance = Env.from_json(json) -# print the JSON string representation of the object -print Env.to_json() - -# convert the object into a dict -env_dict = env_instance.to_dict() -# create an instance of Env from a dict -env_form_dict = env.from_dict(env_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/EnvApi.md b/docs/EnvApi.md deleted file mode 100644 index 41e155b..0000000 --- a/docs/EnvApi.md +++ /dev/null @@ -1,399 +0,0 @@ -# saasus_sdk_python.EnvApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_env**](EnvApi.md#create_env) | **POST** /envs | 環境情報を作成(Create Env Info) -[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | 環境情報を削除(Delete Env Info) -[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | 環境情報を取得(Get Env Details) -[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | 環境情報一覧を取得(Get Env Info) -[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | 環境情報を更新(Update Env Info) - - -# **create_env** -> Env create_env(body=body) - -環境情報を作成(Create Env Info) - -環境情報を作成します。 連携のテストや開発用環境や実際の運用で利用する環境など複数の環境を定義することができます。 Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.env import Env -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.EnvApi(api_client) - body = saasus_sdk_python.Env() # Env | (optional) - - try: - # 環境情報を作成(Create Env Info) - api_response = api_instance.create_env(body=body) - print("The response of EnvApi->create_env:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnvApi->create_env: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Env**| | [optional] - -### Return type - -[**Env**](Env.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_env** -> delete_env(env_id) - -環境情報を削除(Delete Env Info) - -環境情報を削除します。 Delete env info. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.EnvApi(api_client) - env_id = 56 # int | 環境ID(Env ID) - - try: - # 環境情報を削除(Delete Env Info) - api_instance.delete_env(env_id) - except Exception as e: - print("Exception when calling EnvApi->delete_env: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **int**| 環境ID(Env ID) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_env** -> Env get_env(env_id) - -環境情報を取得(Get Env Details) - -環境情報の詳細を取得します。 Get environment details. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.env import Env -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.EnvApi(api_client) - env_id = 56 # int | 環境ID(Env ID) - - try: - # 環境情報を取得(Get Env Details) - api_response = api_instance.get_env(env_id) - print("The response of EnvApi->get_env:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnvApi->get_env: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **int**| 環境ID(Env ID) | - -### Return type - -[**Env**](Env.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_envs** -> Envs get_envs() - -環境情報一覧を取得(Get Env Info) - -登録されている環境情報を取得します。 連携のテストや開発用環境や実際の運用で利用する環境など複数の環境を定義することができます。 Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.envs import Envs -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.EnvApi(api_client) - - try: - # 環境情報一覧を取得(Get Env Info) - api_response = api_instance.get_envs() - print("The response of EnvApi->get_envs:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnvApi->get_envs: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Envs**](Envs.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_env** -> update_env(env_id, update_env_param=update_env_param) - -環境情報を更新(Update Env Info) - -環境情報を更新します。 Update env info. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_env_param import UpdateEnvParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.EnvApi(api_client) - env_id = 56 # int | 環境ID(Env ID) - update_env_param = saasus_sdk_python.UpdateEnvParam() # UpdateEnvParam | (optional) - - try: - # 環境情報を更新(Update Env Info) - api_instance.update_env(env_id, update_env_param=update_env_param) - except Exception as e: - print("Exception when calling EnvApi->update_env: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **int**| 環境ID(Env ID) | - **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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/Envs.md b/docs/Envs.md deleted file mode 100644 index dcd12f2..0000000 --- a/docs/Envs.md +++ /dev/null @@ -1,29 +0,0 @@ -# Envs - -env一覧(env list) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**envs** | [**List[Env]**](Env.md) | | - -## Example - -```python -from saasus_sdk_python.models.envs import Envs - -# TODO update the JSON string below -json = "{}" -# create an instance of Envs from a JSON string -envs_instance = Envs.from_json(json) -# print the JSON string representation of the object -print Envs.to_json() - -# convert the object into a dict -envs_dict = envs_instance.to_dict() -# create an instance of Envs from a dict -envs_form_dict = envs.from_dict(envs_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/Error.md b/docs/Error.md deleted file mode 100644 index aff4e68..0000000 --- a/docs/Error.md +++ /dev/null @@ -1,30 +0,0 @@ -# Error - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | permission_denied | -**message** | **str** | Error message | -**data** | **Dict[str, object]** | | [optional] - -## Example - -```python -from saasus_sdk_python.models.error import Error - -# TODO update the JSON string below -json = "{}" -# create an instance of Error from a JSON string -error_instance = Error.from_json(json) -# print the JSON string representation of the object -print Error.to_json() - -# convert the object into a dict -error_dict = error_instance.to_dict() -# create an instance of Error from a dict -error_form_dict = error.from_dict(error_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/ErrorApi.md b/docs/ErrorApi.md deleted file mode 100644 index dea44b5..0000000 --- a/docs/ErrorApi.md +++ /dev/null @@ -1,79 +0,0 @@ -# saasus_sdk_python.ErrorApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | ステータスコード500でサーバーエラーを返却(Return Internal Server Error) - - -# **return_internal_server_error** -> return_internal_server_error() - -ステータスコード500でサーバーエラーを返却(Return Internal Server Error) - -テスト用途で使用するエンドポイントです。ステータスコード500でサーバーエラーを返却します。 This endpoint is used for testing purposes. Returns a server error with status code 500. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.ErrorApi(api_client) - - try: - # ステータスコード500でサーバーエラーを返却(Return Internal Server Error) - api_instance.return_internal_server_error() - except Exception as e: - print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**500** | Internal Server Error | - | - -[[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/IdentityProviderConfiguration.md b/docs/IdentityProviderConfiguration.md deleted file mode 100644 index 0d9ed94..0000000 --- a/docs/IdentityProviderConfiguration.md +++ /dev/null @@ -1,30 +0,0 @@ -# IdentityProviderConfiguration - -外部IDプロバイダを利用したサインインの設定をするために必要な情報です。(This information is required to set up sign-in using an external identity provider.) 変更はできません。(It cannot be changed.) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**domain** | **str** | ドメイン(domain) | -**redirect_url** | **str** | リダイレクトURL(redirect URL) | - -## Example - -```python -from saasus_sdk_python.models.identity_provider_configuration import IdentityProviderConfiguration - -# TODO update the JSON string below -json = "{}" -# create an instance of IdentityProviderConfiguration from a JSON string -identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) -# print the JSON string representation of the object -print IdentityProviderConfiguration.to_json() - -# convert the object into a dict -identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() -# create an instance of IdentityProviderConfiguration from a dict -identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/IdentityProviderProps.md b/docs/IdentityProviderProps.md deleted file mode 100644 index 51c4dca..0000000 --- a/docs/IdentityProviderProps.md +++ /dev/null @@ -1,30 +0,0 @@ -# IdentityProviderProps - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**application_id** | **str** | | -**application_secret** | **str** | | -**approval_scope** | **str** | | - -## Example - -```python -from saasus_sdk_python.models.identity_provider_props import IdentityProviderProps - -# TODO update the JSON string below -json = "{}" -# create an instance of IdentityProviderProps from a JSON string -identity_provider_props_instance = IdentityProviderProps.from_json(json) -# print the JSON string representation of the object -print IdentityProviderProps.to_json() - -# convert the object into a dict -identity_provider_props_dict = identity_provider_props_instance.to_dict() -# create an instance of IdentityProviderProps from a dict -identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/IdentityProviders.md b/docs/IdentityProviders.md deleted file mode 100644 index f968c67..0000000 --- a/docs/IdentityProviders.md +++ /dev/null @@ -1,28 +0,0 @@ -# IdentityProviders - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | - -## Example - -```python -from saasus_sdk_python.models.identity_providers import IdentityProviders - -# TODO update the JSON string below -json = "{}" -# create an instance of IdentityProviders from a JSON string -identity_providers_instance = IdentityProviders.from_json(json) -# print the JSON string representation of the object -print IdentityProviders.to_json() - -# convert the object into a dict -identity_providers_dict = identity_providers_instance.to_dict() -# create an instance of IdentityProviders from a dict -identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/InvoiceLanguage.md b/docs/InvoiceLanguage.md deleted file mode 100644 index 8efb6f8..0000000 --- a/docs/InvoiceLanguage.md +++ /dev/null @@ -1,11 +0,0 @@ -# InvoiceLanguage - -請求書の言語 Language of invoice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/LinkAwsMarketplaceParam.md b/docs/LinkAwsMarketplaceParam.md deleted file mode 100644 index 8e6ee22..0000000 --- a/docs/LinkAwsMarketplaceParam.md +++ /dev/null @@ -1,30 +0,0 @@ -# LinkAwsMarketplaceParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tenant_id** | **str** | テナントID(tenant ID) | -**access_token** | **str** | アクセストークン(access token) | -**registration_token** | **str** | Registration Token | - -## Example - -```python -from saasus_sdk_python.models.link_aws_marketplace_param import LinkAwsMarketplaceParam - -# TODO update the JSON string below -json = "{}" -# create an instance of LinkAwsMarketplaceParam from a JSON string -link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) -# print the JSON string representation of the object -print LinkAwsMarketplaceParam.to_json() - -# convert the object into a dict -link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() -# create an instance of LinkAwsMarketplaceParam from a dict -link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/MessageTemplate.md b/docs/MessageTemplate.md deleted file mode 100644 index a12da2b..0000000 --- a/docs/MessageTemplate.md +++ /dev/null @@ -1,29 +0,0 @@ -# MessageTemplate - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**subject** | **str** | タイトル(title) | -**message** | **str** | メッセージ(message) | - -## Example - -```python -from saasus_sdk_python.models.message_template import MessageTemplate - -# TODO update the JSON string below -json = "{}" -# create an instance of MessageTemplate from a JSON string -message_template_instance = MessageTemplate.from_json(json) -# print the JSON string representation of the object -print MessageTemplate.to_json() - -# convert the object into a dict -message_template_dict = message_template_instance.to_dict() -# create an instance of MessageTemplate from a dict -message_template_form_dict = message_template.from_dict(message_template_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/MfaConfiguration.md b/docs/MfaConfiguration.md deleted file mode 100644 index 97133bb..0000000 --- a/docs/MfaConfiguration.md +++ /dev/null @@ -1,29 +0,0 @@ -# MfaConfiguration - -MFAデバイス認証設定(MFA device authentication settings) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mfa_configuration** | **str** | on: 全ユーザーがログイン時に適用(apply when all users log in) optional: MFA要素が有効になっている個別ユーザーに適用(apply to individual users with MFA factor enabled) ※ パラメータは現在optionalで固定となります。(The parameter is currently optional and fixed.) | - -## Example - -```python -from saasus_sdk_python.models.mfa_configuration import MfaConfiguration - -# TODO update the JSON string below -json = "{}" -# create an instance of MfaConfiguration from a JSON string -mfa_configuration_instance = MfaConfiguration.from_json(json) -# print the JSON string representation of the object -print MfaConfiguration.to_json() - -# convert the object into a dict -mfa_configuration_dict = mfa_configuration_instance.to_dict() -# create an instance of MfaConfiguration from a dict -mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/MfaPreference.md b/docs/MfaPreference.md deleted file mode 100644 index 0fd92a0..0000000 --- a/docs/MfaPreference.md +++ /dev/null @@ -1,29 +0,0 @@ -# MfaPreference - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | MFAを有効にするか否か(enable MFA) | -**method** | **str** | MFAの方法(enabledがtrueの場合は必須)(MFA method (required if enabled is true)) | [optional] - -## Example - -```python -from saasus_sdk_python.models.mfa_preference import MfaPreference - -# TODO update the JSON string below -json = "{}" -# create an instance of MfaPreference from a JSON string -mfa_preference_instance = MfaPreference.from_json(json) -# print the JSON string representation of the object -print MfaPreference.to_json() - -# convert the object into a dict -mfa_preference_dict = mfa_preference_instance.to_dict() -# create an instance of MfaPreference from a dict -mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/NotificationMessages.md b/docs/NotificationMessages.md deleted file mode 100644 index ddd8712..0000000 --- a/docs/NotificationMessages.md +++ /dev/null @@ -1,34 +0,0 @@ -# NotificationMessages - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | -**create_user** | [**MessageTemplate**](MessageTemplate.md) | | -**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | -**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | -**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | -**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | -**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | - -## Example - -```python -from saasus_sdk_python.models.notification_messages import NotificationMessages - -# TODO update the JSON string below -json = "{}" -# create an instance of NotificationMessages from a JSON string -notification_messages_instance = NotificationMessages.from_json(json) -# print the JSON string representation of the object -print NotificationMessages.to_json() - -# convert the object into a dict -notification_messages_dict = notification_messages_instance.to_dict() -# create an instance of NotificationMessages from a dict -notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/PasswordPolicy.md b/docs/PasswordPolicy.md deleted file mode 100644 index 57b641e..0000000 --- a/docs/PasswordPolicy.md +++ /dev/null @@ -1,34 +0,0 @@ -# PasswordPolicy - -パスワードポリシー(password policy) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**minimum_length** | **int** | 最小文字数(minimum number of characters) | -**is_require_lowercase** | **bool** | 一文字以上の小文字を含むが設定されているか(contains one or more lowercase characters) | -**is_require_numbers** | **bool** | 一文字以上の数字を含むが設定されているか(contains one or more numeric characters) | -**is_require_symbols** | **bool** | 一文字以上の特殊文字を含むが設定されているか(contains one or more special characters) | -**is_require_uppercase** | **bool** | 一文字以上の大文字を含むが設定されているか(contains one or more uppercase letters) | -**temporary_password_validity_days** | **int** | 仮パスワードの有効期限(temporary password expiration date) | - -## Example - -```python -from saasus_sdk_python.models.password_policy import PasswordPolicy - -# TODO update the JSON string below -json = "{}" -# create an instance of PasswordPolicy from a JSON string -password_policy_instance = PasswordPolicy.from_json(json) -# print the JSON string representation of the object -print PasswordPolicy.to_json() - -# convert the object into a dict -password_policy_dict = password_policy_instance.to_dict() -# create an instance of PasswordPolicy from a dict -password_policy_form_dict = password_policy.from_dict(password_policy_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/PlanHistories.md b/docs/PlanHistories.md deleted file mode 100644 index 8657cd5..0000000 --- a/docs/PlanHistories.md +++ /dev/null @@ -1,28 +0,0 @@ -# PlanHistories - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | 料金プラン履歴 | - -## Example - -```python -from saasus_sdk_python.models.plan_histories import PlanHistories - -# TODO update the JSON string below -json = "{}" -# create an instance of PlanHistories from a JSON string -plan_histories_instance = PlanHistories.from_json(json) -# print the JSON string representation of the object -print PlanHistories.to_json() - -# convert the object into a dict -plan_histories_dict = plan_histories_instance.to_dict() -# create an instance of PlanHistories from a dict -plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/PlanHistory.md b/docs/PlanHistory.md deleted file mode 100644 index 694882d..0000000 --- a/docs/PlanHistory.md +++ /dev/null @@ -1,30 +0,0 @@ -# PlanHistory - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plan_id** | **str** | | -**plan_applied_at** | **int** | 登録日時 | -**tax_rate_id** | **str** | | [optional] - -## Example - -```python -from saasus_sdk_python.models.plan_history import PlanHistory - -# TODO update the JSON string below -json = "{}" -# create an instance of PlanHistory from a JSON string -plan_history_instance = PlanHistory.from_json(json) -# print the JSON string representation of the object -print PlanHistory.to_json() - -# convert the object into a dict -plan_history_dict = plan_history_instance.to_dict() -# create an instance of PlanHistory from a dict -plan_history_form_dict = plan_history.from_dict(plan_history_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/PlanReservation.md b/docs/PlanReservation.md deleted file mode 100644 index 34f73c8..0000000 --- a/docs/PlanReservation.md +++ /dev/null @@ -1,30 +0,0 @@ -# PlanReservation - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**next_plan_id** | **str** | | [optional] -**using_next_plan_from** | **int** | 次回料金プラン開始日時(stripe連携時、当月月初の0時(UTC)を指定すると当月月初開始のサブスクリプションを作成できます。ex. 2023年1月の場合は、1672531200 ) (Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)) | [optional] -**next_plan_tax_rate_id** | **str** | | [optional] - -## Example - -```python -from saasus_sdk_python.models.plan_reservation import PlanReservation - -# TODO update the JSON string below -json = "{}" -# create an instance of PlanReservation from a JSON string -plan_reservation_instance = PlanReservation.from_json(json) -# print the JSON string representation of the object -print PlanReservation.to_json() - -# convert the object into a dict -plan_reservation_dict = plan_reservation_instance.to_dict() -# create an instance of PlanReservation from a dict -plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/RecaptchaProps.md b/docs/RecaptchaProps.md deleted file mode 100644 index 1b3026f..0000000 --- a/docs/RecaptchaProps.md +++ /dev/null @@ -1,30 +0,0 @@ -# RecaptchaProps - -reCAPTCHA認証設定(reCAPTCHA authentication settings) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**site_key** | **str** | サイトキー(site key) | -**secret_key** | **str** | シークレットキー(secret key) | - -## Example - -```python -from saasus_sdk_python.models.recaptcha_props import RecaptchaProps - -# TODO update the JSON string below -json = "{}" -# create an instance of RecaptchaProps from a JSON string -recaptcha_props_instance = RecaptchaProps.from_json(json) -# print the JSON string representation of the object -print RecaptchaProps.to_json() - -# convert the object into a dict -recaptcha_props_dict = recaptcha_props_instance.to_dict() -# create an instance of RecaptchaProps from a dict -recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/ResendSignUpConfirmationEmailParam.md b/docs/ResendSignUpConfirmationEmailParam.md deleted file mode 100644 index 8b2271b..0000000 --- a/docs/ResendSignUpConfirmationEmailParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# ResendSignUpConfirmationEmailParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | メールアドレス(Email Address) | - -## Example - -```python -from saasus_sdk_python.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam - -# TODO update the JSON string below -json = "{}" -# create an instance of ResendSignUpConfirmationEmailParam from a JSON string -resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) -# print the JSON string representation of the object -print ResendSignUpConfirmationEmailParam.to_json() - -# convert the object into a dict -resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() -# create an instance of ResendSignUpConfirmationEmailParam from a dict -resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/Role.md b/docs/Role.md deleted file mode 100644 index e42186c..0000000 --- a/docs/Role.md +++ /dev/null @@ -1,30 +0,0 @@ -# Role - -役割(ロール)情報(role info) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**role_name** | **str** | 役割(ロール)名(role name) | -**display_name** | **str** | 役割(ロール)表示名(role display name) | - -## Example - -```python -from saasus_sdk_python.models.role import Role - -# TODO update the JSON string below -json = "{}" -# create an instance of Role from a JSON string -role_instance = Role.from_json(json) -# print the JSON string representation of the object -print Role.to_json() - -# convert the object into a dict -role_dict = role_instance.to_dict() -# create an instance of Role from a dict -role_form_dict = role.from_dict(role_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/RoleApi.md b/docs/RoleApi.md deleted file mode 100644 index e8da3ce..0000000 --- a/docs/RoleApi.md +++ /dev/null @@ -1,240 +0,0 @@ -# saasus_sdk_python.RoleApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_role**](RoleApi.md#create_role) | **POST** /roles | 役割(ロール)を作成(Create Role) -[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | 役割(ロール)を削除(Delete Role) -[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | 役割(ロール)一覧を取得(Get Roles) - - -# **create_role** -> Role create_role(body=body) - -役割(ロール)を作成(Create Role) - -役割(ロール)を作成します。 ここで作成した役割をユーザーに付与することによって、SaaS側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可能です。 Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.role import Role -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.RoleApi(api_client) - body = saasus_sdk_python.Role() # Role | (optional) - - try: - # 役割(ロール)を作成(Create Role) - api_response = api_instance.create_role(body=body) - print("The response of RoleApi->create_role:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RoleApi->create_role: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Role**| | [optional] - -### Return type - -[**Role**](Role.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_role** -> delete_role(role_name) - -役割(ロール)を削除(Delete Role) - -役割(ロール)を削除します。 Delete role. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.RoleApi(api_client) - role_name = 'admin' # str | 役割(ロール)名(role name) - - try: - # 役割(ロール)を削除(Delete Role) - api_instance.delete_role(role_name) - except Exception as e: - print("Exception when calling RoleApi->delete_role: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **role_name** | **str**| 役割(ロール)名(role name) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_roles** -> Roles get_roles() - -役割(ロール)一覧を取得(Get Roles) - -登録されている役割(ロール)を一覧として取得します。 ここで定義した役割をユーザーに付与することによって、SaaS側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可能です。 Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.roles import Roles -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.RoleApi(api_client) - - try: - # 役割(ロール)一覧を取得(Get Roles) - api_response = api_instance.get_roles() - print("The response of RoleApi->get_roles:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RoleApi->get_roles: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Roles**](Roles.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/Roles.md b/docs/Roles.md deleted file mode 100644 index 25c800d..0000000 --- a/docs/Roles.md +++ /dev/null @@ -1,28 +0,0 @@ -# Roles - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**roles** | [**List[Role]**](Role.md) | | - -## Example - -```python -from saasus_sdk_python.models.roles import Roles - -# TODO update the JSON string below -json = "{}" -# create an instance of Roles from a JSON string -roles_instance = Roles.from_json(json) -# print the JSON string representation of the object -print Roles.to_json() - -# convert the object into a dict -roles_dict = roles_instance.to_dict() -# create an instance of Roles from a dict -roles_form_dict = roles.from_dict(roles_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/SaasId.md b/docs/SaasId.md deleted file mode 100644 index 7cf6b39..0000000 --- a/docs/SaasId.md +++ /dev/null @@ -1,30 +0,0 @@ -# SaasId - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tenant_id** | **str** | | -**env_id** | **int** | | -**saas_id** | **str** | saas id | - -## Example - -```python -from saasus_sdk_python.models.saas_id import SaasId - -# TODO update the JSON string below -json = "{}" -# create an instance of SaasId from a JSON string -saas_id_instance = SaasId.from_json(json) -# print the JSON string representation of the object -print SaasId.to_json() - -# convert the object into a dict -saas_id_dict = saas_id_instance.to_dict() -# create an instance of SaasId from a dict -saas_id_form_dict = saas_id.from_dict(saas_id_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/SaasUser.md b/docs/SaasUser.md deleted file mode 100644 index 04ff328..0000000 --- a/docs/SaasUser.md +++ /dev/null @@ -1,29 +0,0 @@ -# SaasUser - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**email** | **str** | メールアドレス(E-mail) | - -## Example - -```python -from saasus_sdk_python.models.saas_user import SaasUser - -# TODO update the JSON string below -json = "{}" -# create an instance of SaasUser from a JSON string -saas_user_instance = SaasUser.from_json(json) -# print the JSON string representation of the object -print SaasUser.to_json() - -# convert the object into a dict -saas_user_dict = saas_user_instance.to_dict() -# create an instance of SaasUser from a dict -saas_user_form_dict = saas_user.from_dict(saas_user_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/SaasUserApi.md b/docs/SaasUserApi.md deleted file mode 100644 index 9f9219b..0000000 --- a/docs/SaasUserApi.md +++ /dev/null @@ -1,1270 +0,0 @@ -# saasus_sdk_python.SaasUserApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace) -[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | SaaSにユーザーを作成(Create SaaS User) -[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | 認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration) -[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | ユーザー情報を削除(Delete User) -[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | ユーザー情報を取得(Get User) -[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | ユーザー一覧を取得(Get Users) -[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | ユーザーのMFA設定を取得(Get User's MFA Settings) -[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace) -[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | 新規登録時の確認メール再送信(Resend Sign Up Confirmation Email) -[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | 新規登録(Sign Up) -[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace) -[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | 外部IDプロバイダの連携解除(Unlink external identity providers) -[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | メールアドレスを変更(Change Email) -[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | パスワードを変更(Change Password) -[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | 認証アプリケーションを登録(Register Authentication Application) -[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | ユーザーのMFA設定を更新(Update User's MFA Settings) - - -# **confirm_sign_up_with_aws_marketplace** -> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) - -AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace) - -AWS Marketplaceと連携したユーザー新規登録を確定します。AWS Marketplaceと連携したテナントを新規作成します。 Registration Tokenが有効でない場合はエラーを返却します。 Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.tenant import Tenant -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) - - try: - # AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace) - api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) - print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] - -### Return type - -[**Tenant**](Tenant.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **create_saas_user** -> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) - -SaaSにユーザーを作成(Create SaaS User) - -SaaSにユーザーを作成します。 Create SaaS User. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.create_saas_user_param import CreateSaasUserParam -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - create_saas_user_param = saasus_sdk_python.CreateSaasUserParam() # CreateSaasUserParam | (optional) - - try: - # SaaSにユーザーを作成(Create SaaS User) - api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) - print("The response of SaasUserApi->create_saas_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] - -### Return type - -[**SaasUser**](SaasUser.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | OK | - | -**400** | Bad Request | - | -**500** | Internal Server Error | - | - -[[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) - -# **create_secret_code** -> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) - -認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration) - -認証アプリケーション登録用のシークレットコードを作成します。 Create a secret code for authentication application registration. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.create_secret_code_param import CreateSecretCodeParam -from saasus_sdk_python.models.software_token_secret_code import SoftwareTokenSecretCode -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - create_secret_code_param = saasus_sdk_python.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) - - try: - # 認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration) - api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) - print("The response of SaasUserApi->create_secret_code:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] - -### Return type - -[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_saas_user** -> delete_saas_user(user_id) - -ユーザー情報を削除(Delete User) - -ユーザーIDを元に一致するユーザーをテナントからすべて削除し、SaaSからも削除します。 Delete all users with matching user ID from the tenant and SaaS. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # ユーザー情報を削除(Delete User) - api_instance.delete_saas_user(user_id) - except Exception as e: - print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_saas_user** -> SaasUser get_saas_user(user_id) - -ユーザー情報を取得(Get User) - -ユーザーIDからユーザー情報を取得します。 Get user information based on user ID. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # ユーザー情報を取得(Get User) - api_response = api_instance.get_saas_user(user_id) - print("The response of SaasUserApi->get_saas_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -[**SaasUser**](SaasUser.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_saas_users** -> SaasUsers get_saas_users() - -ユーザー一覧を取得(Get Users) - -SaaSのユーザー全件を取得します。 Get all SaaS users. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.saas_users import SaasUsers -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - - try: - # ユーザー一覧を取得(Get Users) - api_response = api_instance.get_saas_users() - print("The response of SaasUserApi->get_saas_users:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SaasUsers**](SaasUsers.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_user_mfa_preference** -> MfaPreference get_user_mfa_preference(user_id) - -ユーザーのMFA設定を取得(Get User's MFA Settings) - -ユーザーのMFA設定を取得します。 Get the user's MFA settings. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.mfa_preference import MfaPreference -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # ユーザーのMFA設定を取得(Get User's MFA Settings) - api_response = api_instance.get_user_mfa_preference(user_id) - print("The response of SaasUserApi->get_user_mfa_preference:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -[**MfaPreference**](MfaPreference.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **link_aws_marketplace** -> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) - -AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace) - -AWS Marketplaceと既存のテナントを連携します。 Registration Tokenが有効でない場合はエラーを返却します。 Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.link_aws_marketplace_param import LinkAwsMarketplaceParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - link_aws_marketplace_param = saasus_sdk_python.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) - - try: - # AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace) - api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) - except Exception as e: - print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **resend_sign_up_confirmation_email** -> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) - -新規登録時の確認メール再送信(Resend Sign Up Confirmation Email) - -新規登録時の仮パスワードを再送信します。 Resend temporary password for the new registered user. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - resend_sign_up_confirmation_email_param = saasus_sdk_python.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) - - try: - # 新規登録時の確認メール再送信(Resend Sign Up Confirmation Email) - api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) - except Exception as e: - print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **sign_up** -> SaasUser sign_up(sign_up_param=sign_up_param) - -新規登録(Sign Up) - -ユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 Register a new user. A temporary password will be sent to the registered email. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.models.sign_up_param import SignUpParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - sign_up_param = saasus_sdk_python.SignUpParam() # SignUpParam | (optional) - - try: - # 新規登録(Sign Up) - api_response = api_instance.sign_up(sign_up_param=sign_up_param) - print("The response of SaasUserApi->sign_up:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->sign_up: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] - -### Return type - -[**SaasUser**](SaasUser.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **sign_up_with_aws_marketplace** -> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) - -AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace) - -AWS Marketplaceと連携したユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 Registration Tokenが有効でない場合はエラーを返却します。 Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - sign_up_with_aws_marketplace_param = saasus_sdk_python.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) - - try: - # AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace) - api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) - print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] - -### Return type - -[**SaasUser**](SaasUser.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **unlink_provider** -> unlink_provider(provider_name, user_id) - -外部IDプロバイダの連携解除(Unlink external identity providers) - -外部IDプロバイダの連携を解除します。 Unlink external identity providers. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - provider_name = 'Google' # str | - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # 外部IDプロバイダの連携解除(Unlink external identity providers) - api_instance.unlink_provider(provider_name, user_id) - except Exception as e: - print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **provider_name** | **str**| | - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_saas_user_email** -> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) - -メールアドレスを変更(Change Email) - -ユーザーのメールアドレスを変更します。 Change user's email. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_saas_user_email_param import UpdateSaasUserEmailParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - update_saas_user_email_param = saasus_sdk_python.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) - - try: - # メールアドレスを変更(Change Email) - api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) - except Exception as e: - print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_saas_user_password** -> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) - -パスワードを変更(Change Password) - -ユーザーのログインパスワードを変更します。 Change user's login password. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_saas_user_password_param import UpdateSaasUserPasswordParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - update_saas_user_password_param = saasus_sdk_python.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) - - try: - # パスワードを変更(Change Password) - api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) - except Exception as e: - print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_software_token** -> update_software_token(user_id, update_software_token_param=update_software_token_param) - -認証アプリケーションを登録(Register Authentication Application) - -認証アプリケーションを登録します。 Register an authentication application. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_software_token_param import UpdateSoftwareTokenParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - update_software_token_param = saasus_sdk_python.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) - - try: - # 認証アプリケーションを登録(Register Authentication Application) - api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) - except Exception as e: - print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_user_mfa_preference** -> update_user_mfa_preference(user_id, body=body) - -ユーザーのMFA設定を更新(Update User's MFA Settings) - -ユーザーのMFA設定を更新します。 Update user's MFA settings. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.mfa_preference import MfaPreference -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - body = saasus_sdk_python.MfaPreference() # MfaPreference | (optional) - - try: - # ユーザーのMFA設定を更新(Update User's MFA Settings) - api_instance.update_user_mfa_preference(user_id, body=body) - except Exception as e: - print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - **body** | **MfaPreference**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/SaasUsers.md b/docs/SaasUsers.md deleted file mode 100644 index 22f3835..0000000 --- a/docs/SaasUsers.md +++ /dev/null @@ -1,28 +0,0 @@ -# SaasUsers - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**users** | [**List[SaasUser]**](SaasUser.md) | | - -## Example - -```python -from saasus_sdk_python.models.saas_users import SaasUsers - -# TODO update the JSON string below -json = "{}" -# create an instance of SaasUsers from a JSON string -saas_users_instance = SaasUsers.from_json(json) -# print the JSON string representation of the object -print SaasUsers.to_json() - -# convert the object into a dict -saas_users_dict = saas_users_instance.to_dict() -# create an instance of SaasUsers from a dict -saas_users_form_dict = saas_users.from_dict(saas_users_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/SaasusTenantApi.md b/docs/SaasusTenantApi.md deleted file mode 100644 index 1abbd01..0000000 --- a/docs/SaasusTenantApi.md +++ /dev/null @@ -1,525 +0,0 @@ -# saasus_sdk_python.SaasusTenantApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_api_key**](SaasusTenantApi.md#create_api_key) | **POST** /apikeys | APIキーを作成(Create API Key) -[**delete_api_key**](SaasusTenantApi.md#delete_api_key) | **DELETE** /apikeys/{api_key} | APIキーを削除(Delete API Key) -[**get_api_keys**](SaasusTenantApi.md#get_api_keys) | **GET** /apikeys | APIキー一覧を取得(Get API Keys) -[**get_client_secret**](SaasusTenantApi.md#get_client_secret) | **GET** /client-secret | クライアントシークレットを取得(Get Client Secret) -[**get_saas_id**](SaasusTenantApi.md#get_saas_id) | **GET** /saasid | SaasIDを取得(Get SaasID) -[**update_client_secret**](SaasusTenantApi.md#update_client_secret) | **PATCH** /client-secret | クライアントシークレットを更新(Update Client Secret) -[**update_saas_id**](SaasusTenantApi.md#update_saas_id) | **PATCH** /saasid | SaasIDを更新(Update SaasID) - - -# **create_api_key** -> create_api_key() - -APIキーを作成(Create API Key) - -サーバサイド用に API キーを発行します。 最大 2 つまで発行できます。 Generate an API key for the server side. Up to 2 can be generated. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - - try: - # APIキーを作成(Create API Key) - api_instance.create_api_key() - except Exception as e: - print("Exception when calling SaasusTenantApi->create_api_key: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_api_key** -> delete_api_key(api_key) - -APIキーを削除(Delete API Key) - -サーバサイド用の API キーを削除します。 Delete API Key. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - api_key = 'ZDMiIHN0UmVmOmRvY3VtZW50SUQ9Inhtc' # str | APIキー(API key) - - try: - # APIキーを削除(Delete API Key) - api_instance.delete_api_key(api_key) - except Exception as e: - print("Exception when calling SaasusTenantApi->delete_api_key: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **api_key** | **str**| APIキー(API key) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_api_keys** -> ApiKeys get_api_keys() - -APIキー一覧を取得(Get API Keys) - -サーバサイド用に API キーを取得します。 最大 2 つまで発行できます。 Get API key for the server side. Up to 2 can be generated. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.api_keys import ApiKeys -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - - try: - # APIキー一覧を取得(Get API Keys) - api_response = api_instance.get_api_keys() - print("The response of SaasusTenantApi->get_api_keys:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasusTenantApi->get_api_keys: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ApiKeys**](ApiKeys.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_client_secret** -> ClientSecret get_client_secret() - -クライアントシークレットを取得(Get Client Secret) - -API リクエストでアプリが使用する固定文字列を取得します。 Gets the fixed string that the app uses in API requests. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.client_secret import ClientSecret -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - - try: - # クライアントシークレットを取得(Get Client Secret) - api_response = api_instance.get_client_secret() - print("The response of SaasusTenantApi->get_client_secret:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasusTenantApi->get_client_secret: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ClientSecret**](ClientSecret.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_saas_id** -> SaasId get_saas_id() - -SaasIDを取得(Get SaasID) - -テナントのSaasIDを取得します。 SaaSus API および SaaSus SDK にて利用します。 Get the tenant's SaasID. Used by SaaSus API and SaaSus SDK. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.saas_id import SaasId -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - - try: - # SaasIDを取得(Get SaasID) - api_response = api_instance.get_saas_id() - print("The response of SaasusTenantApi->get_saas_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SaasusTenantApi->get_saas_id: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SaasId**](SaasId.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_client_secret** -> update_client_secret() - -クライアントシークレットを更新(Update Client Secret) - -API リクエストでアプリが使用する固定文字列を再発行します。 既に稼働中のSaaSアプリケーションに設定している場合には、動作に影響があります。 Reissue fixed strings that apps use in API requests. If changed on a SaaS application that is already running, it will affect the behavior. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - - try: - # クライアントシークレットを更新(Update Client Secret) - api_instance.update_client_secret() - except Exception as e: - print("Exception when calling SaasusTenantApi->update_client_secret: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_saas_id** -> update_saas_id() - -SaasIDを更新(Update SaasID) - -テナントのSaasIDを更新します。 SaaSus API および SaaSus SDK にて利用します。 既に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。 Update the tenant's SaasID. Used by SaaSus API and SaaSus SDK. If changed on an SaaS application that is already running, it will affect the behavior. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.SaasusTenantApi(api_client) - - try: - # SaasIDを更新(Update SaasID) - api_instance.update_saas_id() - except Exception as e: - print("Exception when calling SaasusTenantApi->update_saas_id: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/SelfRegist.md b/docs/SelfRegist.md deleted file mode 100644 index 5cd311c..0000000 --- a/docs/SelfRegist.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfRegist - -セルフサインアップを許可設定(self sign-up permission) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enable** | **bool** | | - -## Example - -```python -from saasus_sdk_python.models.self_regist import SelfRegist - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfRegist from a JSON string -self_regist_instance = SelfRegist.from_json(json) -# print the JSON string representation of the object -print SelfRegist.to_json() - -# convert the object into a dict -self_regist_dict = self_regist_instance.to_dict() -# create an instance of SelfRegist from a dict -self_regist_form_dict = self_regist.from_dict(self_regist_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/SignInSettings.md b/docs/SignInSettings.md deleted file mode 100644 index e00ad80..0000000 --- a/docs/SignInSettings.md +++ /dev/null @@ -1,34 +0,0 @@ -# SignInSettings - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | -**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | -**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | -**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | -**account_verification** | [**AccountVerification**](AccountVerification.md) | | -**self_regist** | [**SelfRegist**](SelfRegist.md) | | -**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | - -## Example - -```python -from saasus_sdk_python.models.sign_in_settings import SignInSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of SignInSettings from a JSON string -sign_in_settings_instance = SignInSettings.from_json(json) -# print the JSON string representation of the object -print SignInSettings.to_json() - -# convert the object into a dict -sign_in_settings_dict = sign_in_settings_instance.to_dict() -# create an instance of SignInSettings from a dict -sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/SignUpParam.md b/docs/SignUpParam.md deleted file mode 100644 index 06b6f5b..0000000 --- a/docs/SignUpParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# SignUpParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | メールアドレス(Email Address) | - -## Example - -```python -from saasus_sdk_python.models.sign_up_param import SignUpParam - -# TODO update the JSON string below -json = "{}" -# create an instance of SignUpParam from a JSON string -sign_up_param_instance = SignUpParam.from_json(json) -# print the JSON string representation of the object -print SignUpParam.to_json() - -# convert the object into a dict -sign_up_param_dict = sign_up_param_instance.to_dict() -# create an instance of SignUpParam from a dict -sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/SignUpWithAwsMarketplaceParam.md b/docs/SignUpWithAwsMarketplaceParam.md deleted file mode 100644 index 918d5e0..0000000 --- a/docs/SignUpWithAwsMarketplaceParam.md +++ /dev/null @@ -1,29 +0,0 @@ -# SignUpWithAwsMarketplaceParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | メールアドレス(Email Address) | -**registration_token** | **str** | Registration Token | - -## Example - -```python -from saasus_sdk_python.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam - -# TODO update the JSON string below -json = "{}" -# create an instance of SignUpWithAwsMarketplaceParam from a JSON string -sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) -# print the JSON string representation of the object -print SignUpWithAwsMarketplaceParam.to_json() - -# convert the object into a dict -sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() -# create an instance of SignUpWithAwsMarketplaceParam from a dict -sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/SoftwareTokenSecretCode.md b/docs/SoftwareTokenSecretCode.md deleted file mode 100644 index 97c3511..0000000 --- a/docs/SoftwareTokenSecretCode.md +++ /dev/null @@ -1,28 +0,0 @@ -# SoftwareTokenSecretCode - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**secret_code** | **str** | シークレットコード(secret code) | - -## Example - -```python -from saasus_sdk_python.models.software_token_secret_code import SoftwareTokenSecretCode - -# TODO update the JSON string below -json = "{}" -# create an instance of SoftwareTokenSecretCode from a JSON string -software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) -# print the JSON string representation of the object -print SoftwareTokenSecretCode.to_json() - -# convert the object into a dict -software_token_secret_code_dict = software_token_secret_code_instance.to_dict() -# create an instance of SoftwareTokenSecretCode from a dict -software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/Tenant.md b/docs/Tenant.md deleted file mode 100644 index e2358bf..0000000 --- a/docs/Tenant.md +++ /dev/null @@ -1,37 +0,0 @@ -# Tenant - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | テナント名(tenant name) | -**attributes** | **Dict[str, object]** | 属性情報(attribute info) | -**back_office_staff_email** | **str** | 事務管理部門スタッフメールアドレス(administrative staff email address) | -**next_plan_id** | **str** | | [optional] -**using_next_plan_from** | **int** | 次回料金プラン開始日時(stripe連携時、当月月初の0時(UTC)を指定すると当月月初開始のサブスクリプションを作成できます。ex. 2023年1月の場合は、1672531200 ) (Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)) | [optional] -**next_plan_tax_rate_id** | **str** | | [optional] -**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | 料金プラン履歴 | -**id** | **str** | | -**plan_id** | **str** | | [optional] -**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] - -## Example - -```python -from saasus_sdk_python.models.tenant import Tenant - -# TODO update the JSON string below -json = "{}" -# create an instance of Tenant from a JSON string -tenant_instance = Tenant.from_json(json) -# print the JSON string representation of the object -print Tenant.to_json() - -# convert the object into a dict -tenant_dict = tenant_instance.to_dict() -# create an instance of Tenant from a dict -tenant_form_dict = tenant.from_dict(tenant_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/TenantApi.md b/docs/TenantApi.md deleted file mode 100644 index 7c6e71a..0000000 --- a/docs/TenantApi.md +++ /dev/null @@ -1,777 +0,0 @@ -# saasus_sdk_python.TenantApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | テナントを作成(Create Tenant) -[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | stripe初期設定(Stripe Initial Setting) -[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe) -[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | テナント情報を削除(Delete Tenant) -[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | テナント情報を取得(Get Tenant Details) -[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | テナント一覧取得(Get Tenants) -[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | プランに関わる情報を全削除 -[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | テナント情報を更新(Update Tenant Details) -[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | テナントの請求先情報を更新(Update Tenant Billing Information) -[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | テナントのプラン情報を更新(Update Tenant Plan Information) - - -# **create_tenant** -> Tenant create_tenant(body=body) - -テナントを作成(Create Tenant) - -SaaSus Platform で管理する、テナント情報を作成します。 Create a tenant managed by the SaaSus Platform. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.tenant import Tenant -from saasus_sdk_python.models.tenant_props import TenantProps -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - body = saasus_sdk_python.TenantProps() # TenantProps | (optional) - - try: - # テナントを作成(Create Tenant) - api_response = api_instance.create_tenant(body=body) - print("The response of TenantApi->create_tenant:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantApi->create_tenant: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **TenantProps**| | [optional] - -### Return type - -[**Tenant**](Tenant.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **create_tenant_and_pricing** -> create_tenant_and_pricing() - -stripe初期設定(Stripe Initial Setting) - -billing経由でstripeへ初期情報を設定 Set Stripe initial information via billing - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - - try: - # stripe初期設定(Stripe Initial Setting) - api_instance.create_tenant_and_pricing() - except Exception as e: - print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_stripe_tenant_and_pricing** -> delete_stripe_tenant_and_pricing() - -stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe) - -stripe上の顧客情報・商品情報を削除します Delete customer and product from Stripe. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - - try: - # stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe) - api_instance.delete_stripe_tenant_and_pricing() - except Exception as e: - print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_tenant** -> delete_tenant(tenant_id) - -テナント情報を削除(Delete Tenant) - -SaaSus Platform で管理する、テナントの詳細情報を削除します。 Delete SaaSus Platform tenant. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - - try: - # テナント情報を削除(Delete Tenant) - api_instance.delete_tenant(tenant_id) - except Exception as e: - print("Exception when calling TenantApi->delete_tenant: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_tenant** -> TenantDetail get_tenant(tenant_id) - -テナント情報を取得(Get Tenant Details) - -SaaSus Platform で管理する、テナントの詳細情報を取得します。 Get the details of tenant managed on the SaaSus Platform. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.tenant_detail import TenantDetail -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - - try: - # テナント情報を取得(Get Tenant Details) - api_response = api_instance.get_tenant(tenant_id) - print("The response of TenantApi->get_tenant:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantApi->get_tenant: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - -### Return type - -[**TenantDetail**](TenantDetail.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_tenants** -> Tenants get_tenants() - -テナント一覧取得(Get Tenants) - -SaaSus Platform で管理する、テナント情報の取得を行います。 Get tenants managed by SaaSus Platform. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.tenants import Tenants -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - - try: - # テナント一覧取得(Get Tenants) - api_response = api_instance.get_tenants() - print("The response of TenantApi->get_tenants:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantApi->get_tenants: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Tenants**](Tenants.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **reset_plan** -> reset_plan() - -プランに関わる情報を全削除 - -料金プランに関わる情報を全削除します。 テナントに連携されたプランとプラン定義を削除します。 Stripe連携している場合、連携が解除されます。 Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - - try: - # プランに関わる情報を全削除 - api_instance.reset_plan() - except Exception as e: - print("Exception when calling TenantApi->reset_plan: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_tenant** -> update_tenant(tenant_id, body=body) - -テナント情報を更新(Update Tenant Details) - -SaaSus Platform で管理する、テナントの詳細情報を更新します。 Update SaaSus Platform tenant details. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.tenant_props import TenantProps -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - body = saasus_sdk_python.TenantProps() # TenantProps | (optional) - - try: - # テナント情報を更新(Update Tenant Details) - api_instance.update_tenant(tenant_id, body=body) - except Exception as e: - print("Exception when calling TenantApi->update_tenant: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **body** | **TenantProps**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_tenant_billing_info** -> update_tenant_billing_info(tenant_id, body=body) - -テナントの請求先情報を更新(Update Tenant Billing Information) - -SaaSus Platform で管理しているテナントの請求先情報を更新します。 Update SaaSus Platform tenant billing information. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.billing_info import BillingInfo -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - body = saasus_sdk_python.BillingInfo() # BillingInfo | (optional) - - try: - # テナントの請求先情報を更新(Update Tenant Billing Information) - api_instance.update_tenant_billing_info(tenant_id, body=body) - except Exception as e: - print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **body** | **BillingInfo**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_tenant_plan** -> update_tenant_plan(tenant_id, body=body) - -テナントのプラン情報を更新(Update Tenant Plan Information) - -SaaSus Platform で管理しているテナントのプラン情報を更新します。 Update SaaSus Platform tenant plan information. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.plan_reservation import PlanReservation -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - body = saasus_sdk_python.PlanReservation() # PlanReservation | (optional) - - try: - # テナントのプラン情報を更新(Update Tenant Plan Information) - api_instance.update_tenant_plan(tenant_id, body=body) - except Exception as e: - print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **body** | **PlanReservation**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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/TenantAttributeApi.md b/docs/TenantAttributeApi.md deleted file mode 100644 index d3a43a9..0000000 --- a/docs/TenantAttributeApi.md +++ /dev/null @@ -1,239 +0,0 @@ -# saasus_sdk_python.TenantAttributeApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | テナント属性の作成(Create Tenant Attribute) -[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | テナント属性の削除(Delete Tenant Attribute) -[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | テナント属性の一覧を取得(Get Tenant Attributes) - - -# **create_tenant_attribute** -> Attribute create_tenant_attribute(body=body) - -テナント属性の作成(Create Tenant Attribute) - -SaaSus Platform で管理する、テナントの追加属性の登録を行います。 例えばテナントの呼び名やメモなどをを持たせることができ、SaaSからSaaSus SDK/APIを利用して取得することができます。 Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.attribute import Attribute -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantAttributeApi(api_client) - body = saasus_sdk_python.Attribute() # Attribute | (optional) - - try: - # テナント属性の作成(Create Tenant Attribute) - api_response = api_instance.create_tenant_attribute(body=body) - print("The response of TenantAttributeApi->create_tenant_attribute:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Attribute**| | [optional] - -### Return type - -[**Attribute**](Attribute.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_tenant_attribute** -> delete_tenant_attribute(attribute_name) - -テナント属性の削除(Delete Tenant Attribute) - -SaaSus Platform で管理する、テナントの追加属性の削除を行います。 Deletes tenant attributes managed by SaaSus Platform. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantAttributeApi(api_client) - attribute_name = 'birthday' # str | 属性名(Attribute Name) - - try: - # テナント属性の削除(Delete Tenant Attribute) - api_instance.delete_tenant_attribute(attribute_name) - except Exception as e: - print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attribute_name** | **str**| 属性名(Attribute Name) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_tenant_attributes** -> TenantAttributes get_tenant_attributes() - -テナント属性の一覧を取得(Get Tenant Attributes) - -SaaSus Platform で管理する、テナントの追加属性の定義を取得します。 例えばテナントの呼び名やメモなどをを持たせることができ、SaaSからSaaSus SDK/APIを利用して取得することができます。 Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.tenant_attributes import TenantAttributes -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantAttributeApi(api_client) - - try: - # テナント属性の一覧を取得(Get Tenant Attributes) - api_response = api_instance.get_tenant_attributes() - print("The response of TenantAttributeApi->get_tenant_attributes:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**TenantAttributes**](TenantAttributes.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/TenantAttributes.md b/docs/TenantAttributes.md deleted file mode 100644 index 0efdac5..0000000 --- a/docs/TenantAttributes.md +++ /dev/null @@ -1,28 +0,0 @@ -# TenantAttributes - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tenant_attributes** | [**List[Attribute]**](Attribute.md) | テナント属性定義(Tenant Attribute Definition) | - -## Example - -```python -from saasus_sdk_python.models.tenant_attributes import TenantAttributes - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantAttributes from a JSON string -tenant_attributes_instance = TenantAttributes.from_json(json) -# print the JSON string representation of the object -print TenantAttributes.to_json() - -# convert the object into a dict -tenant_attributes_dict = tenant_attributes_instance.to_dict() -# create an instance of TenantAttributes from a dict -tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/TenantDetail.md b/docs/TenantDetail.md deleted file mode 100644 index 743717e..0000000 --- a/docs/TenantDetail.md +++ /dev/null @@ -1,39 +0,0 @@ -# TenantDetail - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**plan_id** | **str** | | [optional] -**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] -**name** | **str** | テナント名(tenant name) | -**attributes** | **Dict[str, object]** | 属性情報(attribute info) | -**back_office_staff_email** | **str** | 事務管理部門スタッフメールアドレス(administrative staff email address) | -**next_plan_id** | **str** | | [optional] -**using_next_plan_from** | **int** | 次回料金プラン開始日時(stripe連携時、当月月初の0時(UTC)を指定すると当月月初開始のサブスクリプションを作成できます。ex. 2023年1月の場合は、1672531200 ) (Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)) | [optional] -**next_plan_tax_rate_id** | **str** | | [optional] -**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | 料金プラン履歴 | -**current_plan_period_start** | **int** | 現在のプランの開始日時(current plan period start) | [optional] -**current_plan_period_end** | **int** | 現在のプランの終了日時(current plan period end) | [optional] - -## Example - -```python -from saasus_sdk_python.models.tenant_detail import TenantDetail - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantDetail from a JSON string -tenant_detail_instance = TenantDetail.from_json(json) -# print the JSON string representation of the object -print TenantDetail.to_json() - -# convert the object into a dict -tenant_detail_dict = tenant_detail_instance.to_dict() -# create an instance of TenantDetail from a dict -tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/TenantProps.md b/docs/TenantProps.md deleted file mode 100644 index 6aec547..0000000 --- a/docs/TenantProps.md +++ /dev/null @@ -1,30 +0,0 @@ -# TenantProps - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | テナント名(tenant name) | -**attributes** | **Dict[str, object]** | 属性情報(attribute info) | -**back_office_staff_email** | **str** | 事務管理部門スタッフメールアドレス(administrative staff email address) | - -## Example - -```python -from saasus_sdk_python.models.tenant_props import TenantProps - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantProps from a JSON string -tenant_props_instance = TenantProps.from_json(json) -# print the JSON string representation of the object -print TenantProps.to_json() - -# convert the object into a dict -tenant_props_dict = tenant_props_instance.to_dict() -# create an instance of TenantProps from a dict -tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/TenantUserApi.md b/docs/TenantUserApi.md deleted file mode 100644 index 09f82e5..0000000 --- a/docs/TenantUserApi.md +++ /dev/null @@ -1,733 +0,0 @@ -# saasus_sdk_python.TenantUserApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | テナントにユーザーを作成(Create Tenant User) -[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role) -[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | テナントのユーザー情報を削除(Delete Tenant User) -[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User) -[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | ユーザー情報を取得(Get User Info) -[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | ユーザー一覧を取得(Get Users) -[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | テナントのユーザー情報を取得(Get Tenant User) -[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | テナントのユーザー一覧を取得(Get Tenant Users) -[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | テナントのユーザー属性情報を更新(Update Tenant User Attribute) - - -# **create_tenant_user** -> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) - -テナントにユーザーを作成(Create Tenant User) - -テナントにユーザーを作成します。 attributesを空のオブジェクトにした場合、追加属性は空で作成されます。 Create a tenant user. If attributes is empty, the additional attributes will be created empty. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.create_tenant_user_param import CreateTenantUserParam -from saasus_sdk_python.models.user import User -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - create_tenant_user_param = saasus_sdk_python.CreateTenantUserParam() # CreateTenantUserParam | (optional) - - try: - # テナントにユーザーを作成(Create Tenant User) - api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) - print("The response of TenantUserApi->create_tenant_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] - -### Return type - -[**User**](User.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **create_tenant_user_roles** -> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) - -テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role) - -テナントのユーザーに役割(ロール)を作成します。 Create roles on tenant users. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.create_tenant_user_roles_param import CreateTenantUserRolesParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - env_id = 56 # int | 環境ID(Env ID) - create_tenant_user_roles_param = saasus_sdk_python.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) - - try: - # テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role) - api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) - except Exception as e: - print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **user_id** | **str**| ユーザーID(User ID) | - **env_id** | **int**| 環境ID(Env ID) | - **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_tenant_user** -> delete_tenant_user(tenant_id, user_id) - -テナントのユーザー情報を削除(Delete Tenant User) - -テナントからユーザーを削除します。 Delete a user from your tenant. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # テナントのユーザー情報を削除(Delete Tenant User) - api_instance.delete_tenant_user(tenant_id, user_id) - except Exception as e: - print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_tenant_user_role** -> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) - -テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User) - -テナントのユーザーから役割(ロール)を削除します。 Remove a role from a tenant user. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - env_id = 56 # int | 環境ID(Env ID) - role_name = 'admin' # str | 役割(ロール)名(role name) - - try: - # テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User) - api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) - except Exception as e: - print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **user_id** | **str**| ユーザーID(User ID) | - **env_id** | **int**| 環境ID(Env ID) | - **role_name** | **str**| 役割(ロール)名(role name) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_all_tenant_user** -> Users get_all_tenant_user(user_id) - -ユーザー情報を取得(Get User Info) - -ユーザーIDからテナントに所属しているユーザー情報を取得します。 複数テナントに所属している場合は別のオブジェクトとして返却されます。 Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.users import Users -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # ユーザー情報を取得(Get User Info) - api_response = api_instance.get_all_tenant_user(user_id) - print("The response of TenantUserApi->get_all_tenant_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -[**Users**](Users.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_all_tenant_users** -> Users get_all_tenant_users() - -ユーザー一覧を取得(Get Users) - -テナントに所属しているユーザー全件を取得します。 複数テナントに所属する同一ユーザーは別のオブジェクトとして返却されます。 idは一意ではありません。 Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.users import Users -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - - try: - # ユーザー一覧を取得(Get Users) - api_response = api_instance.get_all_tenant_users() - print("The response of TenantUserApi->get_all_tenant_users:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Users**](Users.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_tenant_user** -> User get_tenant_user(tenant_id, user_id) - -テナントのユーザー情報を取得(Get Tenant User) - -テナントのユーザーをIDから一件取得します。 Get one tenant user by specific ID. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.user import User -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - - try: - # テナントのユーザー情報を取得(Get Tenant User) - api_response = api_instance.get_tenant_user(tenant_id, user_id) - print("The response of TenantUserApi->get_tenant_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **user_id** | **str**| ユーザーID(User ID) | - -### Return type - -[**User**](User.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_tenant_users** -> Users get_tenant_users(tenant_id) - -テナントのユーザー一覧を取得(Get Tenant Users) - -テナントに所属するユーザーを全件取得します。 idは一意です。 Get all the users belonging to the tenant. Id is unique. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.users import Users -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - - try: - # テナントのユーザー一覧を取得(Get Tenant Users) - api_response = api_instance.get_tenant_users(tenant_id) - print("The response of TenantUserApi->get_tenant_users:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - -### Return type - -[**Users**](Users.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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) - -# **update_tenant_user** -> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) - -テナントのユーザー属性情報を更新(Update Tenant User Attribute) - -テナントのユーザー属性情報を更新します。 Update tenant user attributes. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.update_tenant_user_param import UpdateTenantUserParam -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.TenantUserApi(api_client) - tenant_id = 'tenant_id_example' # str | テナントID(Tenant ID) - user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | ユーザーID(User ID) - update_tenant_user_param = saasus_sdk_python.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) - - try: - # テナントのユーザー属性情報を更新(Update Tenant User Attribute) - api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) - except Exception as e: - print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tenant_id** | **str**| テナントID(Tenant ID) | - **user_id** | **str**| ユーザーID(User ID) | - **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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/Tenants.md b/docs/Tenants.md deleted file mode 100644 index 115d6dc..0000000 --- a/docs/Tenants.md +++ /dev/null @@ -1,29 +0,0 @@ -# Tenants - -テナント情報(Tenant Info) - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tenants** | [**List[Tenant]**](Tenant.md) | | - -## Example - -```python -from saasus_sdk_python.models.tenants import Tenants - -# TODO update the JSON string below -json = "{}" -# create an instance of Tenants from a JSON string -tenants_instance = Tenants.from_json(json) -# print the JSON string representation of the object -print Tenants.to_json() - -# convert the object into a dict -tenants_dict = tenants_instance.to_dict() -# create an instance of Tenants from a dict -tenants_form_dict = tenants.from_dict(tenants_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/UpdateBasicInfoParam.md b/docs/UpdateBasicInfoParam.md deleted file mode 100644 index d22041d..0000000 --- a/docs/UpdateBasicInfoParam.md +++ /dev/null @@ -1,30 +0,0 @@ -# UpdateBasicInfoParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**domain_name** | **str** | ドメイン名(Domain Name) | -**from_email_address** | **str** | 認証メールの送信元メールアドレス(Sender email of authentication email) | -**reply_email_address** | **str** | 認証メールの返信元メールアドレス(Reply-from email address of authentication email) | [optional] - -## Example - -```python -from saasus_sdk_python.models.update_basic_info_param import UpdateBasicInfoParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateBasicInfoParam from a JSON string -update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) -# print the JSON string representation of the object -print UpdateBasicInfoParam.to_json() - -# convert the object into a dict -update_basic_info_param_dict = update_basic_info_param_instance.to_dict() -# create an instance of UpdateBasicInfoParam from a dict -update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/UpdateCustomizePageSettingsParam.md b/docs/UpdateCustomizePageSettingsParam.md deleted file mode 100644 index e6a56c5..0000000 --- a/docs/UpdateCustomizePageSettingsParam.md +++ /dev/null @@ -1,33 +0,0 @@ -# UpdateCustomizePageSettingsParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | サービス名(service name) | -**terms_of_service_url** | **str** | 利用規約URL(terms of service URL) | -**privacy_policy_url** | **str** | プライバシーポリシーURL(privacy policy URL) | -**google_tag_manager_container_id** | **str** | Google Tag Manager コンテナ ID(Google Tag Manager container ID) | -**icon** | **str** | サービスアイコン(service icon) | -**favicon** | **str** | ファビコン(favicon) | - -## Example - -```python -from saasus_sdk_python.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateCustomizePageSettingsParam from a JSON string -update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) -# print the JSON string representation of the object -print UpdateCustomizePageSettingsParam.to_json() - -# convert the object into a dict -update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() -# create an instance of UpdateCustomizePageSettingsParam from a dict -update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/UpdateCustomizePagesParam.md b/docs/UpdateCustomizePagesParam.md deleted file mode 100644 index 209a030..0000000 --- a/docs/UpdateCustomizePagesParam.md +++ /dev/null @@ -1,30 +0,0 @@ -# UpdateCustomizePagesParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] -**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] -**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] - -## Example - -```python -from saasus_sdk_python.models.update_customize_pages_param import UpdateCustomizePagesParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateCustomizePagesParam from a JSON string -update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) -# print the JSON string representation of the object -print UpdateCustomizePagesParam.to_json() - -# convert the object into a dict -update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() -# create an instance of UpdateCustomizePagesParam from a dict -update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/UpdateEnvParam.md b/docs/UpdateEnvParam.md deleted file mode 100644 index 5d0687c..0000000 --- a/docs/UpdateEnvParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# UpdateEnvParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | 環境名(env name) | - -## Example - -```python -from saasus_sdk_python.models.update_env_param import UpdateEnvParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateEnvParam from a JSON string -update_env_param_instance = UpdateEnvParam.from_json(json) -# print the JSON string representation of the object -print UpdateEnvParam.to_json() - -# convert the object into a dict -update_env_param_dict = update_env_param_instance.to_dict() -# create an instance of UpdateEnvParam from a dict -update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/UpdateIdentityProviderParam.md b/docs/UpdateIdentityProviderParam.md deleted file mode 100644 index 5d35348..0000000 --- a/docs/UpdateIdentityProviderParam.md +++ /dev/null @@ -1,29 +0,0 @@ -# UpdateIdentityProviderParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**provider** | [**ProviderName**](ProviderName.md) | | -**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] - -## Example - -```python -from saasus_sdk_python.models.update_identity_provider_param import UpdateIdentityProviderParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateIdentityProviderParam from a JSON string -update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) -# print the JSON string representation of the object -print UpdateIdentityProviderParam.to_json() - -# convert the object into a dict -update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() -# create an instance of UpdateIdentityProviderParam from a dict -update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/UpdateNotificationMessagesParam.md b/docs/UpdateNotificationMessagesParam.md deleted file mode 100644 index 243781d..0000000 --- a/docs/UpdateNotificationMessagesParam.md +++ /dev/null @@ -1,34 +0,0 @@ -# UpdateNotificationMessagesParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] -**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] -**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] -**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] -**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] -**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] -**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] - -## Example - -```python -from saasus_sdk_python.models.update_notification_messages_param import UpdateNotificationMessagesParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateNotificationMessagesParam from a JSON string -update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) -# print the JSON string representation of the object -print UpdateNotificationMessagesParam.to_json() - -# convert the object into a dict -update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() -# create an instance of UpdateNotificationMessagesParam from a dict -update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/UpdateSaasUserEmailParam.md b/docs/UpdateSaasUserEmailParam.md deleted file mode 100644 index a185a0a..0000000 --- a/docs/UpdateSaasUserEmailParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# UpdateSaasUserEmailParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | メールアドレス(e-mail) | - -## Example - -```python -from saasus_sdk_python.models.update_saas_user_email_param import UpdateSaasUserEmailParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSaasUserEmailParam from a JSON string -update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) -# print the JSON string representation of the object -print UpdateSaasUserEmailParam.to_json() - -# convert the object into a dict -update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() -# create an instance of UpdateSaasUserEmailParam from a dict -update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/UpdateSaasUserPasswordParam.md b/docs/UpdateSaasUserPasswordParam.md deleted file mode 100644 index f01fb87..0000000 --- a/docs/UpdateSaasUserPasswordParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# UpdateSaasUserPasswordParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**password** | **str** | パスワード(password) | - -## Example - -```python -from saasus_sdk_python.models.update_saas_user_password_param import UpdateSaasUserPasswordParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSaasUserPasswordParam from a JSON string -update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) -# print the JSON string representation of the object -print UpdateSaasUserPasswordParam.to_json() - -# convert the object into a dict -update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() -# create an instance of UpdateSaasUserPasswordParam from a dict -update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/UpdateSignInSettingsParam.md b/docs/UpdateSignInSettingsParam.md deleted file mode 100644 index f703da8..0000000 --- a/docs/UpdateSignInSettingsParam.md +++ /dev/null @@ -1,33 +0,0 @@ -# UpdateSignInSettingsParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] -**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] -**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] -**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] -**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] -**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] - -## Example - -```python -from saasus_sdk_python.models.update_sign_in_settings_param import UpdateSignInSettingsParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSignInSettingsParam from a JSON string -update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) -# print the JSON string representation of the object -print UpdateSignInSettingsParam.to_json() - -# convert the object into a dict -update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() -# create an instance of UpdateSignInSettingsParam from a dict -update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/UpdateSoftwareTokenParam.md b/docs/UpdateSoftwareTokenParam.md deleted file mode 100644 index dad873e..0000000 --- a/docs/UpdateSoftwareTokenParam.md +++ /dev/null @@ -1,29 +0,0 @@ -# UpdateSoftwareTokenParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_token** | **str** | アクセストークン(access token) | -**verification_code** | **str** | 検証コード(verification code) | - -## Example - -```python -from saasus_sdk_python.models.update_software_token_param import UpdateSoftwareTokenParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSoftwareTokenParam from a JSON string -update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) -# print the JSON string representation of the object -print UpdateSoftwareTokenParam.to_json() - -# convert the object into a dict -update_software_token_param_dict = update_software_token_param_instance.to_dict() -# create an instance of UpdateSoftwareTokenParam from a dict -update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/UpdateTenantUserParam.md b/docs/UpdateTenantUserParam.md deleted file mode 100644 index 43a15aa..0000000 --- a/docs/UpdateTenantUserParam.md +++ /dev/null @@ -1,28 +0,0 @@ -# UpdateTenantUserParam - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributes** | **Dict[str, object]** | 属性情報(SaaS 開発コンソールでユーザー属性定義を行い設定された情報を取得します) Attribute information (Get information set by defining user attributes in the SaaS development console) | - -## Example - -```python -from saasus_sdk_python.models.update_tenant_user_param import UpdateTenantUserParam - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateTenantUserParam from a JSON string -update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) -# print the JSON string representation of the object -print UpdateTenantUserParam.to_json() - -# convert the object into a dict -update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() -# create an instance of UpdateTenantUserParam from a dict -update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/User.md b/docs/User.md deleted file mode 100644 index 487b6cc..0000000 --- a/docs/User.md +++ /dev/null @@ -1,33 +0,0 @@ -# User - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | ユーザーID(User ID) | -**tenant_id** | **str** | | -**tenant_name** | **str** | テナント名(Tenant Name) | -**email** | **str** | メールアドレス(E-mail) | -**attributes** | **Dict[str, object]** | 属性情報(SaaS 開発コンソールでユーザー属性定義を行い設定された情報を取得します) Attribute information (Get information set by defining user attributes in the SaaS development console) | -**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | - -## Example - -```python -from saasus_sdk_python.models.user import User - -# TODO update the JSON string below -json = "{}" -# create an instance of User from a JSON string -user_instance = User.from_json(json) -# print the JSON string representation of the object -print User.to_json() - -# convert the object into a dict -user_dict = user_instance.to_dict() -# create an instance of User from a dict -user_form_dict = user.from_dict(user_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/UserAttributeApi.md b/docs/UserAttributeApi.md deleted file mode 100644 index 9bb52d9..0000000 --- a/docs/UserAttributeApi.md +++ /dev/null @@ -1,239 +0,0 @@ -# saasus_sdk_python.UserAttributeApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | ユーザー属性の作成(Create User Attributes) -[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | ユーザー属性の削除(Delete User Attribute) -[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | ユーザー属性の一覧を取得(Get User Attributes) - - -# **create_user_attribute** -> Attribute create_user_attribute(body=body) - -ユーザー属性の作成(Create User Attributes) - -SaaSus Platform にて保持するユーザーの追加属性を登録します。 例えば、ユーザー名を持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます。 一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性定義を行わずに SaaS 側で個人情報を持つことを検討してください。 Create additional user attributes to be kept on the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.attribute import Attribute -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.UserAttributeApi(api_client) - body = saasus_sdk_python.Attribute() # Attribute | (optional) - - try: - # ユーザー属性の作成(Create User Attributes) - api_response = api_instance.create_user_attribute(body=body) - print("The response of UserAttributeApi->create_user_attribute:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Attribute**| | [optional] - -### Return type - -[**Attribute**](Attribute.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**500** | Internal Server Error | - | - -[[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) - -# **delete_user_attribute** -> delete_user_attribute(attribute_name) - -ユーザー属性の削除(Delete User Attribute) - -SaaSus Platform にて保持するユーザーの追加属性を削除します。 Delete user attributes kept on the SaaSus Platform. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.UserAttributeApi(api_client) - attribute_name = 'birthday' # str | 属性名(Attribute Name) - - try: - # ユーザー属性の削除(Delete User Attribute) - api_instance.delete_user_attribute(attribute_name) - except Exception as e: - print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **attribute_name** | **str**| 属性名(Attribute Name) | - -### Return type - -void (empty response body) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[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) - -# **get_user_attributes** -> UserAttributes get_user_attributes() - -ユーザー属性の一覧を取得(Get User Attributes) - -SaaSus Platform にて保持するユーザーの追加属性を取得します。 例えば、ユーザー名を持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます。 一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性定義を行わずに SaaS 側で個人情報を持つことを検討してください。 Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.user_attributes import UserAttributes -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.UserAttributeApi(api_client) - - try: - # ユーザー属性の一覧を取得(Get User Attributes) - api_response = api_instance.get_user_attributes() - print("The response of UserAttributeApi->get_user_attributes:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UserAttributes**](UserAttributes.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**500** | Internal Server Error | - | - -[[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/UserAttributes.md b/docs/UserAttributes.md deleted file mode 100644 index 26166b4..0000000 --- a/docs/UserAttributes.md +++ /dev/null @@ -1,28 +0,0 @@ -# UserAttributes - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_attributes** | [**List[Attribute]**](Attribute.md) | ユーザー属性定義(User attribute definition) | - -## Example - -```python -from saasus_sdk_python.models.user_attributes import UserAttributes - -# TODO update the JSON string below -json = "{}" -# create an instance of UserAttributes from a JSON string -user_attributes_instance = UserAttributes.from_json(json) -# print the JSON string representation of the object -print UserAttributes.to_json() - -# convert the object into a dict -user_attributes_dict = user_attributes_instance.to_dict() -# create an instance of UserAttributes from a dict -user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/UserAvailableEnv.md b/docs/UserAvailableEnv.md deleted file mode 100644 index 2772769..0000000 --- a/docs/UserAvailableEnv.md +++ /dev/null @@ -1,30 +0,0 @@ -# UserAvailableEnv - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | 環境名(env name) | -**roles** | [**List[Role]**](Role.md) | 役割(ロール)情報(role info) | - -## Example - -```python -from saasus_sdk_python.models.user_available_env import UserAvailableEnv - -# TODO update the JSON string below -json = "{}" -# create an instance of UserAvailableEnv from a JSON string -user_available_env_instance = UserAvailableEnv.from_json(json) -# print the JSON string representation of the object -print UserAvailableEnv.to_json() - -# convert the object into a dict -user_available_env_dict = user_available_env_instance.to_dict() -# create an instance of UserAvailableEnv from a dict -user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/UserAvailableTenant.md b/docs/UserAvailableTenant.md deleted file mode 100644 index 3bfdd54..0000000 --- a/docs/UserAvailableTenant.md +++ /dev/null @@ -1,35 +0,0 @@ -# UserAvailableTenant - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**name** | **str** | テナント名(tenant name) | -**completed_sign_up** | **bool** | | -**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | 環境情報、役割(ロール)情報(environmental info, role info) | -**user_attribute** | **Dict[str, object]** | ユーザー追加属性(user additional attributes) | -**back_office_staff_email** | **str** | バックオフィス担当者のメール(back office contact email) | -**plan_id** | **str** | | [optional] -**is_paid** | **bool** | テナントの支払い状況(tenant payment status) ※ 現在はストライプ連携時のみ返却されます。Currently, it is returned only when stripe is linked. | [optional] - -## Example - -```python -from saasus_sdk_python.models.user_available_tenant import UserAvailableTenant - -# TODO update the JSON string below -json = "{}" -# create an instance of UserAvailableTenant from a JSON string -user_available_tenant_instance = UserAvailableTenant.from_json(json) -# print the JSON string representation of the object -print UserAvailableTenant.to_json() - -# convert the object into a dict -user_available_tenant_dict = user_available_tenant_instance.to_dict() -# create an instance of UserAvailableTenant from a dict -user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/UserInfo.md b/docs/UserInfo.md deleted file mode 100644 index 4db26bc..0000000 --- a/docs/UserInfo.md +++ /dev/null @@ -1,30 +0,0 @@ -# UserInfo - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**email** | **str** | メールアドレス(E-mail) | -**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | テナント情報(Tenant Info) | - -## Example - -```python -from saasus_sdk_python.models.user_info import UserInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of UserInfo from a JSON string -user_info_instance = UserInfo.from_json(json) -# print the JSON string representation of the object -print UserInfo.to_json() - -# convert the object into a dict -user_info_dict = user_info_instance.to_dict() -# create an instance of UserInfo from a dict -user_info_form_dict = user_info.from_dict(user_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/UserInfoApi.md b/docs/UserInfoApi.md deleted file mode 100644 index e32a628..0000000 --- a/docs/UserInfoApi.md +++ /dev/null @@ -1,88 +0,0 @@ -# saasus_sdk_python.UserInfoApi - -All URIs are relative to *https://api.saasus.io/v1/auth* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | ユーザー情報取得(Get User Info) - - -# **get_user_info** -> UserInfo get_user_info(token) - -ユーザー情報取得(Get User Info) - -SaaS利用ユーザ(登録ユーザ)のIDトークンを元に、ユーザ情報を取得します。 IDトークンは、SaaSus Platform生成のログイン画面からログイン時にCallback URLに渡されます。 サーバ側でそのURLからIDトークンを取得し、このAPIを呼ぶことにより、該当ユーザの情報が取得できます。 取得した上には、所属テナントや役割(ロール)、料金プランなどが含まれているため、それを元に認可の実装を行うことが可能です。 User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. - -### Example - -* Bearer Authentication (Bearer): -```python -import time -import os -import saasus_sdk_python -from saasus_sdk_python.models.user_info import UserInfo -from saasus_sdk_python.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.saasus.io/v1/auth -# See configuration.py for a list of all supported configuration parameters. -configuration = saasus_sdk_python.Configuration( - host = "https://api.saasus.io/v1/auth" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: Bearer -configuration = saasus_sdk_python.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with saasus_sdk_python.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = saasus_sdk_python.UserInfoApi(api_client) - token = 'token_example' # str | IDトークン(ID Token) - - try: - # ユーザー情報取得(Get User Info) - api_response = api_instance.get_user_info(token) - print("The response of UserInfoApi->get_user_info:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **str**| IDトークン(ID Token) | - -### Return type - -[**UserInfo**](UserInfo.md) - -### Authorization - -[Bearer](../README.md#Bearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**500** | Internal Server Error | - | - -[[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/Users.md b/docs/Users.md deleted file mode 100644 index 9930483..0000000 --- a/docs/Users.md +++ /dev/null @@ -1,28 +0,0 @@ -# Users - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**users** | [**List[User]**](User.md) | | - -## Example - -```python -from saasus_sdk_python.models.users import Users - -# TODO update the JSON string below -json = "{}" -# create an instance of Users from a JSON string -users_instance = Users.from_json(json) -# print the JSON string representation of the object -print Users.to_json() - -# convert the object into a dict -users_dict = users_instance.to_dict() -# create an instance of Users from a dict -users_form_dict = users.from_dict(users_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/apilog/AccountVerification.md b/docs/apilog/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/apilog/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/apilog/AggregateUsage.md b/docs/apilog/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/apilog/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/ApiKeys.md b/docs/apilog/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/apilog/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/apilog/ApiLog.md b/docs/apilog/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/apilog/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/apilog/ApiLogApi.md b/docs/apilog/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/apilog/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/ApiLogs.md b/docs/apilog/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/apilog/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/apilog/Attribute.md b/docs/apilog/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/apilog/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/apilog/AttributeType.md b/docs/apilog/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/apilog/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/AuthInfo.md b/docs/apilog/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/apilog/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/apilog/AuthInfoApi.md b/docs/apilog/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/apilog/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/AuthorizationTempCode.md b/docs/apilog/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/apilog/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/apilog/AwsMarketplaceApi.md b/docs/apilog/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/apilog/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/apilog/AwsRegion.md b/docs/apilog/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/apilog/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/BasicInfo.md b/docs/apilog/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/apilog/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/apilog/BasicInfoApi.md b/docs/apilog/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/apilog/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/BillingAddress.md b/docs/apilog/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/apilog/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/apilog/BillingInfo.md b/docs/apilog/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/apilog/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/apilog/CatalogEntityVisibility.md b/docs/apilog/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/apilog/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/apilog/ClientSecret.md b/docs/apilog/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/apilog/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/apilog/CloudFormationLaunchStackLink.md b/docs/apilog/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/apilog/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/apilog/Comment.md b/docs/apilog/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/apilog/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/apilog/Comments.md b/docs/apilog/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/apilog/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/apilog/ConfirmEmailUpdateParam.md b/docs/apilog/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/apilog/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/apilog/ConfirmExternalUserLinkParam.md b/docs/apilog/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/apilog/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/apilog/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/apilog/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/apilog/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/apilog/CreateCustomerParam.md b/docs/apilog/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/apilog/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/apilog/CreateEventBridgeEventParam.md b/docs/apilog/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/apilog/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/apilog/CreateFeedbackCommentParam.md b/docs/apilog/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/apilog/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/apilog/CreateFeedbackParam.md b/docs/apilog/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/apilog/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/apilog/CreateSaasUserParam.md b/docs/apilog/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/apilog/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/apilog/CreateSecretCodeParam.md b/docs/apilog/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/apilog/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/apilog/CreateTenantInvitationParam.md b/docs/apilog/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/apilog/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/apilog/CreateTenantUserParam.md b/docs/apilog/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/apilog/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/apilog/CreateTenantUserRolesParam.md b/docs/apilog/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/apilog/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/apilog/CreateVoteUserParam.md b/docs/apilog/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/apilog/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/apilog/CredentialApi.md b/docs/apilog/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/apilog/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/Credentials.md b/docs/apilog/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/apilog/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/apilog/Currency.md b/docs/apilog/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/apilog/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/Customer.md b/docs/apilog/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/apilog/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/apilog/Customers.md b/docs/apilog/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/apilog/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/apilog/CustomizePageProps.md b/docs/apilog/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/apilog/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/apilog/CustomizePageSettings.md b/docs/apilog/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/apilog/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/apilog/CustomizePageSettingsProps.md b/docs/apilog/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/apilog/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/apilog/CustomizePages.md b/docs/apilog/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/apilog/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/apilog/DeviceConfiguration.md b/docs/apilog/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/apilog/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/apilog/DnsRecord.md b/docs/apilog/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/apilog/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/apilog/Env.md b/docs/apilog/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/apilog/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/apilog/EnvApi.md b/docs/apilog/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/apilog/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/Envs.md b/docs/apilog/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/apilog/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/apilog/Error.md b/docs/apilog/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/apilog/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/apilog/ErrorApi.md b/docs/apilog/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/apilog/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/apilog/EventBridgeApi.md b/docs/apilog/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/apilog/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/EventBridgeSettings.md b/docs/apilog/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/apilog/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/apilog/EventMessage.md b/docs/apilog/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/apilog/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/apilog/Feedback.md b/docs/apilog/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/apilog/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/apilog/FeedbackApi.md b/docs/apilog/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/apilog/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/FeedbackSaveProps.md b/docs/apilog/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/apilog/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/apilog/Feedbacks.md b/docs/apilog/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/apilog/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/apilog/GetListingStatusResult.md b/docs/apilog/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/apilog/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/apilog/IdentityProviderConfiguration.md b/docs/apilog/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/apilog/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/apilog/IdentityProviderProps.md b/docs/apilog/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/apilog/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/apilog/IdentityProviderSaml.md b/docs/apilog/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/apilog/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/apilog/IdentityProviders.md b/docs/apilog/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/apilog/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/apilog/Invitation.md b/docs/apilog/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/apilog/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/apilog/InvitationApi.md b/docs/apilog/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/apilog/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/InvitationStatus.md b/docs/apilog/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/apilog/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/InvitationValidity.md b/docs/apilog/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/apilog/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/apilog/Invitations.md b/docs/apilog/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/apilog/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/apilog/InvitedUserEnvironmentInformationInner.md b/docs/apilog/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/apilog/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/apilog/InvoiceLanguage.md b/docs/apilog/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/apilog/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/LinkAwsMarketplaceParam.md b/docs/apilog/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/apilog/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/apilog/ListingStatus.md b/docs/apilog/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/apilog/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/MessageTemplate.md b/docs/apilog/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/apilog/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/apilog/MeteringApi.md b/docs/apilog/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/apilog/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/MeteringUnit.md b/docs/apilog/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/apilog/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/apilog/MeteringUnitCount.md b/docs/apilog/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/apilog/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/apilog/MeteringUnitDateCount.md b/docs/apilog/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/apilog/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/apilog/MeteringUnitDateCounts.md b/docs/apilog/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/apilog/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/apilog/MeteringUnitDatePeriodCounts.md b/docs/apilog/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/apilog/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/apilog/MeteringUnitMonthCount.md b/docs/apilog/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/apilog/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/apilog/MeteringUnitMonthCounts.md b/docs/apilog/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/apilog/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/apilog/MeteringUnitProps.md b/docs/apilog/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/apilog/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/apilog/MeteringUnitTimestampCount.md b/docs/apilog/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/apilog/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/apilog/MeteringUnits.md b/docs/apilog/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/apilog/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/apilog/MfaConfiguration.md b/docs/apilog/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/apilog/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/apilog/MfaPreference.md b/docs/apilog/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/apilog/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/apilog/NotificationMessages.md b/docs/apilog/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/apilog/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/apilog/PasswordPolicy.md b/docs/apilog/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/apilog/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/apilog/Plan.md b/docs/apilog/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/apilog/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/apilog/PlanHistories.md b/docs/apilog/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/apilog/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/apilog/PlanHistory.md b/docs/apilog/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/apilog/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/apilog/PlanReservation.md b/docs/apilog/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/apilog/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/apilog/Plans.md b/docs/apilog/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/apilog/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/apilog/PricingFixedUnit.md b/docs/apilog/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/apilog/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/apilog/PricingFixedUnitForSave.md b/docs/apilog/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/apilog/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/apilog/PricingMenu.md b/docs/apilog/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/apilog/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/apilog/PricingMenuProps.md b/docs/apilog/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/apilog/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/apilog/PricingMenus.md b/docs/apilog/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/apilog/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/apilog/PricingMenusApi.md b/docs/apilog/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/apilog/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/PricingPlan.md b/docs/apilog/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/apilog/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/apilog/PricingPlanProps.md b/docs/apilog/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/apilog/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/apilog/PricingPlans.md b/docs/apilog/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/apilog/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/apilog/PricingPlansApi.md b/docs/apilog/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/apilog/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/PricingTier.md b/docs/apilog/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/apilog/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/apilog/PricingTieredUnit.md b/docs/apilog/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/apilog/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/apilog/PricingTieredUnitForSave.md b/docs/apilog/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/apilog/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/apilog/PricingTieredUsageUnit.md b/docs/apilog/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/apilog/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/apilog/PricingTieredUsageUnitForSave.md b/docs/apilog/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/apilog/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/apilog/PricingTiers.md b/docs/apilog/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/apilog/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/apilog/PricingUnit.md b/docs/apilog/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/apilog/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/apilog/PricingUnitBaseProps.md b/docs/apilog/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/apilog/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/apilog/PricingUnitForSave.md b/docs/apilog/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/apilog/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/apilog/PricingUnits.md b/docs/apilog/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/apilog/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/apilog/PricingUnitsApi.md b/docs/apilog/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/apilog/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/PricingUsageUnit.md b/docs/apilog/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/apilog/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/apilog/PricingUsageUnitForSave.md b/docs/apilog/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/apilog/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/apilog/ProrationBehavior.md b/docs/apilog/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/apilog/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/ProviderName.md b/docs/apilog/ProviderName.md similarity index 100% rename from docs/ProviderName.md rename to docs/apilog/ProviderName.md diff --git a/docs/apilog/ProviderType.md b/docs/apilog/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/apilog/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/RecaptchaProps.md b/docs/apilog/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/apilog/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/apilog/RecurringInterval.md b/docs/apilog/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/apilog/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/RequestEmailUpdateParam.md b/docs/apilog/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/apilog/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/apilog/RequestExternalUserLinkParam.md b/docs/apilog/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/apilog/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/apilog/ResendSignUpConfirmationEmailParam.md b/docs/apilog/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/apilog/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/apilog/Role.md b/docs/apilog/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/apilog/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/apilog/RoleApi.md b/docs/apilog/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/apilog/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/Roles.md b/docs/apilog/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/apilog/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/apilog/SaasId.md b/docs/apilog/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/apilog/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/apilog/SaasUser.md b/docs/apilog/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/apilog/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/apilog/SaasUserApi.md b/docs/apilog/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/apilog/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/SaasUsers.md b/docs/apilog/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/apilog/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/apilog/SavePlanParam.md b/docs/apilog/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/apilog/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/apilog/SavePricingMenuParam.md b/docs/apilog/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/apilog/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/apilog/SavePricingPlanParam.md b/docs/apilog/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/apilog/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/apilog/SelfRegist.md b/docs/apilog/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/apilog/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/apilog/Settings.md b/docs/apilog/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/apilog/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/apilog/SignInSettings.md b/docs/apilog/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/apilog/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/apilog/SignUpParam.md b/docs/apilog/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/apilog/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/apilog/SignUpWithAwsMarketplaceParam.md b/docs/apilog/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/apilog/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/apilog/SingleTenantApi.md b/docs/apilog/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/apilog/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/apilog/SingleTenantSettings.md b/docs/apilog/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/apilog/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/apilog/SoftwareTokenSecretCode.md b/docs/apilog/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/apilog/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/apilog/StripeApi.md b/docs/apilog/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/apilog/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/StripeCustomer.md b/docs/apilog/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/apilog/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/apilog/StripeInfo.md b/docs/apilog/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/apilog/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/apilog/TaxRate.md b/docs/apilog/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/apilog/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/apilog/TaxRateApi.md b/docs/apilog/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/apilog/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/apilog/TaxRateProps.md b/docs/apilog/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/apilog/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/apilog/TaxRates.md b/docs/apilog/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/apilog/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/apilog/Tenant.md b/docs/apilog/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/apilog/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/apilog/TenantApi.md b/docs/apilog/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/apilog/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/TenantAttributeApi.md b/docs/apilog/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/apilog/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/TenantAttributes.md b/docs/apilog/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/apilog/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/apilog/TenantDetail.md b/docs/apilog/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/apilog/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/apilog/TenantIdentityProviderProps.md b/docs/apilog/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/apilog/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/apilog/TenantIdentityProviders.md b/docs/apilog/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/apilog/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/apilog/TenantIdentityProvidersSaml.md b/docs/apilog/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/apilog/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/apilog/TenantProps.md b/docs/apilog/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/apilog/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/apilog/TenantUserApi.md b/docs/apilog/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/apilog/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/Tenants.md b/docs/apilog/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/apilog/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/apilog/UnitType.md b/docs/apilog/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/apilog/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/UpdateBasicInfoParam.md b/docs/apilog/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/apilog/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/apilog/UpdateCustomizePageSettingsParam.md b/docs/apilog/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/apilog/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/apilog/UpdateCustomizePagesParam.md b/docs/apilog/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/apilog/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/apilog/UpdateEnvParam.md b/docs/apilog/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/apilog/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/apilog/UpdateFeedbackCommentParam.md b/docs/apilog/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/apilog/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/apilog/UpdateFeedbackParam.md b/docs/apilog/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/apilog/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/apilog/UpdateFeedbackStatusParam.md b/docs/apilog/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/apilog/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/apilog/UpdateIdentityProviderParam.md b/docs/apilog/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/apilog/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/apilog/UpdateListingStatusParam.md b/docs/apilog/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/apilog/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/apilog/UpdateMeteringUnitTimestampCountMethod.md b/docs/apilog/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/apilog/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/UpdateMeteringUnitTimestampCountNowParam.md b/docs/apilog/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/apilog/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/apilog/UpdateMeteringUnitTimestampCountParam.md b/docs/apilog/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/apilog/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/apilog/UpdateNotificationMessagesParam.md b/docs/apilog/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/apilog/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/apilog/UpdatePricingPlansUsedParam.md b/docs/apilog/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/apilog/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/apilog/UpdateSaasUserAttributesParam.md b/docs/apilog/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/apilog/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/apilog/UpdateSaasUserEmailParam.md b/docs/apilog/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/apilog/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/apilog/UpdateSaasUserPasswordParam.md b/docs/apilog/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/apilog/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/apilog/UpdateSettingsParam.md b/docs/apilog/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/apilog/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/apilog/UpdateSignInSettingsParam.md b/docs/apilog/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/apilog/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/apilog/UpdateSingleTenantSettingsParam.md b/docs/apilog/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/apilog/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/apilog/UpdateSoftwareTokenParam.md b/docs/apilog/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/apilog/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/apilog/UpdateStripeInfoParam.md b/docs/apilog/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/apilog/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/apilog/UpdateTaxRateParam.md b/docs/apilog/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/apilog/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/apilog/UpdateTenantIdentityProviderParam.md b/docs/apilog/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/apilog/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/apilog/UpdateTenantUserParam.md b/docs/apilog/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/apilog/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/apilog/User.md b/docs/apilog/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/apilog/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/apilog/UserAttributeApi.md b/docs/apilog/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/apilog/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/apilog/UserAttributes.md b/docs/apilog/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/apilog/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/apilog/UserAvailableEnv.md b/docs/apilog/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/apilog/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/apilog/UserAvailableTenant.md b/docs/apilog/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/apilog/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/apilog/UserInfo.md b/docs/apilog/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/apilog/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/apilog/UserInfoApi.md b/docs/apilog/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/apilog/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/apilog/Users.md b/docs/apilog/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/apilog/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/apilog/ValidateInvitationParam.md b/docs/apilog/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/apilog/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/apilog/VerifyRegistrationTokenParam.md b/docs/apilog/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/apilog/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/apilog/VisibilityStatus.md b/docs/apilog/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/apilog/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/apilog/Votes.md b/docs/apilog/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/apilog/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/auth/AccountVerification.md b/docs/auth/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/auth/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/auth/AggregateUsage.md b/docs/auth/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/auth/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/ApiKeys.md b/docs/auth/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/auth/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/auth/ApiLog.md b/docs/auth/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/auth/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/auth/ApiLogApi.md b/docs/auth/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/auth/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/ApiLogs.md b/docs/auth/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/auth/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/auth/Attribute.md b/docs/auth/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/auth/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/auth/AttributeType.md b/docs/auth/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/auth/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/AuthInfo.md b/docs/auth/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/auth/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/auth/AuthInfoApi.md b/docs/auth/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/auth/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/AuthorizationTempCode.md b/docs/auth/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/auth/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/auth/AwsMarketplaceApi.md b/docs/auth/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/auth/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/auth/AwsRegion.md b/docs/auth/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/auth/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/BasicInfo.md b/docs/auth/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/auth/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/auth/BasicInfoApi.md b/docs/auth/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/auth/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/BillingAddress.md b/docs/auth/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/auth/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/auth/BillingInfo.md b/docs/auth/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/auth/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/auth/CatalogEntityVisibility.md b/docs/auth/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/auth/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/auth/ClientSecret.md b/docs/auth/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/auth/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/auth/CloudFormationLaunchStackLink.md b/docs/auth/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/auth/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/auth/Comment.md b/docs/auth/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/auth/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/auth/Comments.md b/docs/auth/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/auth/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/auth/ConfirmEmailUpdateParam.md b/docs/auth/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/auth/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/auth/ConfirmExternalUserLinkParam.md b/docs/auth/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/auth/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/auth/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/auth/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/auth/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/auth/CreateCustomerParam.md b/docs/auth/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/auth/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/auth/CreateEventBridgeEventParam.md b/docs/auth/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/auth/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/auth/CreateFeedbackCommentParam.md b/docs/auth/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/auth/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/auth/CreateFeedbackParam.md b/docs/auth/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/auth/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/auth/CreateSaasUserParam.md b/docs/auth/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/auth/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/auth/CreateSecretCodeParam.md b/docs/auth/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/auth/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/auth/CreateTenantInvitationParam.md b/docs/auth/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/auth/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/auth/CreateTenantUserParam.md b/docs/auth/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/auth/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/auth/CreateTenantUserRolesParam.md b/docs/auth/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/auth/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/auth/CreateVoteUserParam.md b/docs/auth/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/auth/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/auth/CredentialApi.md b/docs/auth/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/auth/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/Credentials.md b/docs/auth/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/auth/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/auth/Currency.md b/docs/auth/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/auth/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/Customer.md b/docs/auth/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/auth/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/auth/Customers.md b/docs/auth/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/auth/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/auth/CustomizePageProps.md b/docs/auth/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/auth/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/auth/CustomizePageSettings.md b/docs/auth/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/auth/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/auth/CustomizePageSettingsProps.md b/docs/auth/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/auth/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/auth/CustomizePages.md b/docs/auth/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/auth/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/auth/DeviceConfiguration.md b/docs/auth/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/auth/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/auth/DnsRecord.md b/docs/auth/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/auth/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/auth/Env.md b/docs/auth/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/auth/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/auth/EnvApi.md b/docs/auth/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/auth/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/Envs.md b/docs/auth/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/auth/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/auth/Error.md b/docs/auth/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/auth/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/auth/ErrorApi.md b/docs/auth/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/auth/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/auth/EventBridgeApi.md b/docs/auth/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/auth/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/EventBridgeSettings.md b/docs/auth/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/auth/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/auth/EventMessage.md b/docs/auth/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/auth/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/auth/Feedback.md b/docs/auth/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/auth/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/auth/FeedbackApi.md b/docs/auth/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/auth/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/FeedbackSaveProps.md b/docs/auth/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/auth/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/auth/Feedbacks.md b/docs/auth/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/auth/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/auth/GetListingStatusResult.md b/docs/auth/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/auth/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/auth/IdentityProviderConfiguration.md b/docs/auth/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/auth/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/auth/IdentityProviderProps.md b/docs/auth/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/auth/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/auth/IdentityProviderSaml.md b/docs/auth/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/auth/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/auth/IdentityProviders.md b/docs/auth/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/auth/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/auth/Invitation.md b/docs/auth/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/auth/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/auth/InvitationApi.md b/docs/auth/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/auth/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/InvitationStatus.md b/docs/auth/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/auth/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/InvitationValidity.md b/docs/auth/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/auth/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/auth/Invitations.md b/docs/auth/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/auth/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/auth/InvitedUserEnvironmentInformationInner.md b/docs/auth/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/auth/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/auth/InvoiceLanguage.md b/docs/auth/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/auth/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/LinkAwsMarketplaceParam.md b/docs/auth/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/auth/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/auth/ListingStatus.md b/docs/auth/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/auth/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/MessageTemplate.md b/docs/auth/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/auth/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/auth/MeteringApi.md b/docs/auth/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/auth/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/MeteringUnit.md b/docs/auth/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/auth/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/auth/MeteringUnitCount.md b/docs/auth/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/auth/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/auth/MeteringUnitDateCount.md b/docs/auth/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/auth/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/auth/MeteringUnitDateCounts.md b/docs/auth/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/auth/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/auth/MeteringUnitDatePeriodCounts.md b/docs/auth/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/auth/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/auth/MeteringUnitMonthCount.md b/docs/auth/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/auth/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/auth/MeteringUnitMonthCounts.md b/docs/auth/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/auth/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/auth/MeteringUnitProps.md b/docs/auth/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/auth/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/auth/MeteringUnitTimestampCount.md b/docs/auth/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/auth/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/auth/MeteringUnits.md b/docs/auth/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/auth/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/auth/MfaConfiguration.md b/docs/auth/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/auth/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/auth/MfaPreference.md b/docs/auth/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/auth/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/auth/NotificationMessages.md b/docs/auth/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/auth/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/auth/PasswordPolicy.md b/docs/auth/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/auth/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/auth/Plan.md b/docs/auth/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/auth/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/auth/PlanHistories.md b/docs/auth/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/auth/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/auth/PlanHistory.md b/docs/auth/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/auth/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/auth/PlanReservation.md b/docs/auth/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/auth/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/auth/Plans.md b/docs/auth/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/auth/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/auth/PricingFixedUnit.md b/docs/auth/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/auth/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/auth/PricingFixedUnitForSave.md b/docs/auth/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/auth/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/auth/PricingMenu.md b/docs/auth/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/auth/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/auth/PricingMenuProps.md b/docs/auth/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/auth/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/auth/PricingMenus.md b/docs/auth/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/auth/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/auth/PricingMenusApi.md b/docs/auth/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/auth/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/PricingPlan.md b/docs/auth/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/auth/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/auth/PricingPlanProps.md b/docs/auth/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/auth/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/auth/PricingPlans.md b/docs/auth/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/auth/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/auth/PricingPlansApi.md b/docs/auth/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/auth/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/PricingTier.md b/docs/auth/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/auth/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/auth/PricingTieredUnit.md b/docs/auth/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/auth/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/auth/PricingTieredUnitForSave.md b/docs/auth/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/auth/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/auth/PricingTieredUsageUnit.md b/docs/auth/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/auth/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/auth/PricingTieredUsageUnitForSave.md b/docs/auth/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/auth/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/auth/PricingTiers.md b/docs/auth/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/auth/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/auth/PricingUnit.md b/docs/auth/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/auth/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/auth/PricingUnitBaseProps.md b/docs/auth/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/auth/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/auth/PricingUnitForSave.md b/docs/auth/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/auth/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/auth/PricingUnits.md b/docs/auth/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/auth/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/auth/PricingUnitsApi.md b/docs/auth/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/auth/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/PricingUsageUnit.md b/docs/auth/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/auth/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/auth/PricingUsageUnitForSave.md b/docs/auth/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/auth/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/auth/ProrationBehavior.md b/docs/auth/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/auth/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/ProviderName.md b/docs/auth/ProviderName.md new file mode 100644 index 0000000..b59bd95 --- /dev/null +++ b/docs/auth/ProviderName.md @@ -0,0 +1,10 @@ +# ProviderName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/ProviderType.md b/docs/auth/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/auth/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/RecaptchaProps.md b/docs/auth/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/auth/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/auth/RecurringInterval.md b/docs/auth/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/auth/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/RequestEmailUpdateParam.md b/docs/auth/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/auth/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/auth/RequestExternalUserLinkParam.md b/docs/auth/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/auth/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/auth/ResendSignUpConfirmationEmailParam.md b/docs/auth/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/auth/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/auth/Role.md b/docs/auth/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/auth/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/auth/RoleApi.md b/docs/auth/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/auth/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/Roles.md b/docs/auth/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/auth/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/auth/SaasId.md b/docs/auth/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/auth/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/auth/SaasUser.md b/docs/auth/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/auth/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/auth/SaasUserApi.md b/docs/auth/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/auth/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/SaasUsers.md b/docs/auth/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/auth/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/auth/SavePlanParam.md b/docs/auth/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/auth/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/auth/SavePricingMenuParam.md b/docs/auth/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/auth/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/auth/SavePricingPlanParam.md b/docs/auth/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/auth/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/auth/SelfRegist.md b/docs/auth/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/auth/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/auth/Settings.md b/docs/auth/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/auth/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/auth/SignInSettings.md b/docs/auth/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/auth/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/auth/SignUpParam.md b/docs/auth/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/auth/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/auth/SignUpWithAwsMarketplaceParam.md b/docs/auth/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/auth/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/auth/SingleTenantApi.md b/docs/auth/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/auth/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/auth/SingleTenantSettings.md b/docs/auth/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/auth/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/auth/SoftwareTokenSecretCode.md b/docs/auth/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/auth/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/auth/StripeApi.md b/docs/auth/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/auth/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/StripeCustomer.md b/docs/auth/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/auth/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/auth/StripeInfo.md b/docs/auth/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/auth/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/auth/TaxRate.md b/docs/auth/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/auth/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/auth/TaxRateApi.md b/docs/auth/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/auth/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/auth/TaxRateProps.md b/docs/auth/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/auth/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/auth/TaxRates.md b/docs/auth/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/auth/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/auth/Tenant.md b/docs/auth/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/auth/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/auth/TenantApi.md b/docs/auth/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/auth/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/TenantAttributeApi.md b/docs/auth/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/auth/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/TenantAttributes.md b/docs/auth/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/auth/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/auth/TenantDetail.md b/docs/auth/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/auth/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/auth/TenantIdentityProviderProps.md b/docs/auth/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/auth/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/auth/TenantIdentityProviders.md b/docs/auth/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/auth/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/auth/TenantIdentityProvidersSaml.md b/docs/auth/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/auth/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/auth/TenantProps.md b/docs/auth/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/auth/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/auth/TenantUserApi.md b/docs/auth/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/auth/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/Tenants.md b/docs/auth/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/auth/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/auth/UnitType.md b/docs/auth/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/auth/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/UpdateBasicInfoParam.md b/docs/auth/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/auth/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/auth/UpdateCustomizePageSettingsParam.md b/docs/auth/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/auth/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/auth/UpdateCustomizePagesParam.md b/docs/auth/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/auth/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/auth/UpdateEnvParam.md b/docs/auth/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/auth/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/auth/UpdateFeedbackCommentParam.md b/docs/auth/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/auth/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/auth/UpdateFeedbackParam.md b/docs/auth/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/auth/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/auth/UpdateFeedbackStatusParam.md b/docs/auth/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/auth/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/auth/UpdateIdentityProviderParam.md b/docs/auth/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/auth/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/auth/UpdateListingStatusParam.md b/docs/auth/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/auth/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/auth/UpdateMeteringUnitTimestampCountMethod.md b/docs/auth/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/auth/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/UpdateMeteringUnitTimestampCountNowParam.md b/docs/auth/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/auth/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/auth/UpdateMeteringUnitTimestampCountParam.md b/docs/auth/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/auth/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/auth/UpdateNotificationMessagesParam.md b/docs/auth/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/auth/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/auth/UpdatePricingPlansUsedParam.md b/docs/auth/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/auth/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/auth/UpdateSaasUserAttributesParam.md b/docs/auth/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/auth/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/auth/UpdateSaasUserEmailParam.md b/docs/auth/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/auth/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/auth/UpdateSaasUserPasswordParam.md b/docs/auth/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/auth/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/auth/UpdateSettingsParam.md b/docs/auth/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/auth/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/auth/UpdateSignInSettingsParam.md b/docs/auth/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/auth/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/auth/UpdateSingleTenantSettingsParam.md b/docs/auth/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/auth/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/auth/UpdateSoftwareTokenParam.md b/docs/auth/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/auth/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/auth/UpdateStripeInfoParam.md b/docs/auth/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/auth/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/auth/UpdateTaxRateParam.md b/docs/auth/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/auth/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/auth/UpdateTenantIdentityProviderParam.md b/docs/auth/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/auth/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/auth/UpdateTenantUserParam.md b/docs/auth/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/auth/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/auth/User.md b/docs/auth/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/auth/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/auth/UserAttributeApi.md b/docs/auth/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/auth/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/auth/UserAttributes.md b/docs/auth/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/auth/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/auth/UserAvailableEnv.md b/docs/auth/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/auth/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/auth/UserAvailableTenant.md b/docs/auth/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/auth/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/auth/UserInfo.md b/docs/auth/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/auth/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/auth/UserInfoApi.md b/docs/auth/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/auth/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/auth/Users.md b/docs/auth/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/auth/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/auth/ValidateInvitationParam.md b/docs/auth/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/auth/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/auth/VerifyRegistrationTokenParam.md b/docs/auth/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/auth/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/auth/VisibilityStatus.md b/docs/auth/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/auth/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/auth/Votes.md b/docs/auth/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/auth/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/awsmarketplace/AccountVerification.md b/docs/awsmarketplace/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/awsmarketplace/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/awsmarketplace/AggregateUsage.md b/docs/awsmarketplace/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/awsmarketplace/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/ApiKeys.md b/docs/awsmarketplace/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/awsmarketplace/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/awsmarketplace/ApiLog.md b/docs/awsmarketplace/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/awsmarketplace/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/awsmarketplace/ApiLogApi.md b/docs/awsmarketplace/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/awsmarketplace/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/ApiLogs.md b/docs/awsmarketplace/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/awsmarketplace/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/awsmarketplace/Attribute.md b/docs/awsmarketplace/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/awsmarketplace/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/awsmarketplace/AttributeType.md b/docs/awsmarketplace/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/awsmarketplace/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/AuthInfo.md b/docs/awsmarketplace/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/awsmarketplace/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/awsmarketplace/AuthInfoApi.md b/docs/awsmarketplace/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/awsmarketplace/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/AuthorizationTempCode.md b/docs/awsmarketplace/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/awsmarketplace/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/awsmarketplace/AwsMarketplaceApi.md b/docs/awsmarketplace/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/awsmarketplace/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/AwsRegion.md b/docs/awsmarketplace/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/awsmarketplace/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/BasicInfo.md b/docs/awsmarketplace/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/awsmarketplace/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/awsmarketplace/BasicInfoApi.md b/docs/awsmarketplace/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/awsmarketplace/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/BillingAddress.md b/docs/awsmarketplace/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/awsmarketplace/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/awsmarketplace/BillingInfo.md b/docs/awsmarketplace/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/awsmarketplace/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/awsmarketplace/CatalogEntityVisibility.md b/docs/awsmarketplace/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/awsmarketplace/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/awsmarketplace/ClientSecret.md b/docs/awsmarketplace/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/awsmarketplace/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/awsmarketplace/CloudFormationLaunchStackLink.md b/docs/awsmarketplace/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/awsmarketplace/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/awsmarketplace/Comment.md b/docs/awsmarketplace/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/awsmarketplace/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/awsmarketplace/Comments.md b/docs/awsmarketplace/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/awsmarketplace/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/awsmarketplace/ConfirmEmailUpdateParam.md b/docs/awsmarketplace/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/awsmarketplace/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/awsmarketplace/ConfirmExternalUserLinkParam.md b/docs/awsmarketplace/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/awsmarketplace/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/awsmarketplace/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/awsmarketplace/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/awsmarketplace/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/awsmarketplace/CreateCustomerParam.md b/docs/awsmarketplace/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/awsmarketplace/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/awsmarketplace/CreateEventBridgeEventParam.md b/docs/awsmarketplace/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/awsmarketplace/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/awsmarketplace/CreateFeedbackCommentParam.md b/docs/awsmarketplace/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/awsmarketplace/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/awsmarketplace/CreateFeedbackParam.md b/docs/awsmarketplace/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/awsmarketplace/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/awsmarketplace/CreateSaasUserParam.md b/docs/awsmarketplace/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/awsmarketplace/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/awsmarketplace/CreateSecretCodeParam.md b/docs/awsmarketplace/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/awsmarketplace/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/awsmarketplace/CreateTenantInvitationParam.md b/docs/awsmarketplace/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/awsmarketplace/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/awsmarketplace/CreateTenantUserParam.md b/docs/awsmarketplace/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/awsmarketplace/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/awsmarketplace/CreateTenantUserRolesParam.md b/docs/awsmarketplace/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/awsmarketplace/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/awsmarketplace/CreateVoteUserParam.md b/docs/awsmarketplace/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/awsmarketplace/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/awsmarketplace/CredentialApi.md b/docs/awsmarketplace/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/awsmarketplace/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/Credentials.md b/docs/awsmarketplace/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/awsmarketplace/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/awsmarketplace/Currency.md b/docs/awsmarketplace/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/awsmarketplace/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/Customer.md b/docs/awsmarketplace/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/awsmarketplace/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/awsmarketplace/Customers.md b/docs/awsmarketplace/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/awsmarketplace/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/awsmarketplace/CustomizePageProps.md b/docs/awsmarketplace/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/awsmarketplace/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/awsmarketplace/CustomizePageSettings.md b/docs/awsmarketplace/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/awsmarketplace/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/awsmarketplace/CustomizePageSettingsProps.md b/docs/awsmarketplace/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/awsmarketplace/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/awsmarketplace/CustomizePages.md b/docs/awsmarketplace/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/awsmarketplace/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/awsmarketplace/DeviceConfiguration.md b/docs/awsmarketplace/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/awsmarketplace/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/awsmarketplace/DnsRecord.md b/docs/awsmarketplace/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/awsmarketplace/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/awsmarketplace/Env.md b/docs/awsmarketplace/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/awsmarketplace/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/awsmarketplace/EnvApi.md b/docs/awsmarketplace/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/awsmarketplace/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/Envs.md b/docs/awsmarketplace/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/awsmarketplace/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/awsmarketplace/Error.md b/docs/awsmarketplace/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/awsmarketplace/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/awsmarketplace/ErrorApi.md b/docs/awsmarketplace/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/awsmarketplace/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/awsmarketplace/EventBridgeApi.md b/docs/awsmarketplace/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/awsmarketplace/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/EventBridgeSettings.md b/docs/awsmarketplace/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/awsmarketplace/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/awsmarketplace/EventMessage.md b/docs/awsmarketplace/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/awsmarketplace/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/awsmarketplace/Feedback.md b/docs/awsmarketplace/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/awsmarketplace/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/awsmarketplace/FeedbackApi.md b/docs/awsmarketplace/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/awsmarketplace/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/FeedbackSaveProps.md b/docs/awsmarketplace/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/awsmarketplace/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/awsmarketplace/Feedbacks.md b/docs/awsmarketplace/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/awsmarketplace/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/awsmarketplace/GetListingStatusResult.md b/docs/awsmarketplace/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/awsmarketplace/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/awsmarketplace/IdentityProviderConfiguration.md b/docs/awsmarketplace/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/awsmarketplace/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/awsmarketplace/IdentityProviderProps.md b/docs/awsmarketplace/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/awsmarketplace/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/awsmarketplace/IdentityProviderSaml.md b/docs/awsmarketplace/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/awsmarketplace/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/awsmarketplace/IdentityProviders.md b/docs/awsmarketplace/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/awsmarketplace/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/awsmarketplace/Invitation.md b/docs/awsmarketplace/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/awsmarketplace/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/awsmarketplace/InvitationApi.md b/docs/awsmarketplace/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/awsmarketplace/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/InvitationStatus.md b/docs/awsmarketplace/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/awsmarketplace/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/InvitationValidity.md b/docs/awsmarketplace/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/awsmarketplace/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/awsmarketplace/Invitations.md b/docs/awsmarketplace/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/awsmarketplace/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/awsmarketplace/InvitedUserEnvironmentInformationInner.md b/docs/awsmarketplace/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/awsmarketplace/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/awsmarketplace/InvoiceLanguage.md b/docs/awsmarketplace/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/awsmarketplace/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/LinkAwsMarketplaceParam.md b/docs/awsmarketplace/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/awsmarketplace/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/awsmarketplace/ListingStatus.md b/docs/awsmarketplace/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/awsmarketplace/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/MessageTemplate.md b/docs/awsmarketplace/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/awsmarketplace/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/awsmarketplace/MeteringApi.md b/docs/awsmarketplace/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/awsmarketplace/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/MeteringUnit.md b/docs/awsmarketplace/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/awsmarketplace/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/awsmarketplace/MeteringUnitCount.md b/docs/awsmarketplace/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/awsmarketplace/MeteringUnitDateCount.md b/docs/awsmarketplace/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/awsmarketplace/MeteringUnitDateCounts.md b/docs/awsmarketplace/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/awsmarketplace/MeteringUnitDatePeriodCounts.md b/docs/awsmarketplace/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/awsmarketplace/MeteringUnitMonthCount.md b/docs/awsmarketplace/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/awsmarketplace/MeteringUnitMonthCounts.md b/docs/awsmarketplace/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/awsmarketplace/MeteringUnitProps.md b/docs/awsmarketplace/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/awsmarketplace/MeteringUnitTimestampCount.md b/docs/awsmarketplace/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/awsmarketplace/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/awsmarketplace/MeteringUnits.md b/docs/awsmarketplace/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/awsmarketplace/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/awsmarketplace/MfaConfiguration.md b/docs/awsmarketplace/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/awsmarketplace/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/awsmarketplace/MfaPreference.md b/docs/awsmarketplace/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/awsmarketplace/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/awsmarketplace/NotificationMessages.md b/docs/awsmarketplace/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/awsmarketplace/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/awsmarketplace/PasswordPolicy.md b/docs/awsmarketplace/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/awsmarketplace/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/awsmarketplace/Plan.md b/docs/awsmarketplace/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/awsmarketplace/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/awsmarketplace/PlanHistories.md b/docs/awsmarketplace/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/awsmarketplace/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/awsmarketplace/PlanHistory.md b/docs/awsmarketplace/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/awsmarketplace/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/awsmarketplace/PlanReservation.md b/docs/awsmarketplace/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/awsmarketplace/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/awsmarketplace/Plans.md b/docs/awsmarketplace/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/awsmarketplace/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/awsmarketplace/PricingFixedUnit.md b/docs/awsmarketplace/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/awsmarketplace/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/awsmarketplace/PricingFixedUnitForSave.md b/docs/awsmarketplace/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/awsmarketplace/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/awsmarketplace/PricingMenu.md b/docs/awsmarketplace/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/awsmarketplace/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/awsmarketplace/PricingMenuProps.md b/docs/awsmarketplace/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/awsmarketplace/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/awsmarketplace/PricingMenus.md b/docs/awsmarketplace/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/awsmarketplace/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/awsmarketplace/PricingMenusApi.md b/docs/awsmarketplace/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/awsmarketplace/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/PricingPlan.md b/docs/awsmarketplace/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/awsmarketplace/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/awsmarketplace/PricingPlanProps.md b/docs/awsmarketplace/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/awsmarketplace/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/awsmarketplace/PricingPlans.md b/docs/awsmarketplace/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/awsmarketplace/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/awsmarketplace/PricingPlansApi.md b/docs/awsmarketplace/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/awsmarketplace/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/PricingTier.md b/docs/awsmarketplace/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/awsmarketplace/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/awsmarketplace/PricingTieredUnit.md b/docs/awsmarketplace/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/awsmarketplace/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/awsmarketplace/PricingTieredUnitForSave.md b/docs/awsmarketplace/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/awsmarketplace/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/awsmarketplace/PricingTieredUsageUnit.md b/docs/awsmarketplace/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/awsmarketplace/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/awsmarketplace/PricingTieredUsageUnitForSave.md b/docs/awsmarketplace/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/awsmarketplace/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/awsmarketplace/PricingTiers.md b/docs/awsmarketplace/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/awsmarketplace/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/awsmarketplace/PricingUnit.md b/docs/awsmarketplace/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/awsmarketplace/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/awsmarketplace/PricingUnitBaseProps.md b/docs/awsmarketplace/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/awsmarketplace/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/awsmarketplace/PricingUnitForSave.md b/docs/awsmarketplace/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/awsmarketplace/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/awsmarketplace/PricingUnits.md b/docs/awsmarketplace/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/awsmarketplace/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/awsmarketplace/PricingUnitsApi.md b/docs/awsmarketplace/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/awsmarketplace/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/PricingUsageUnit.md b/docs/awsmarketplace/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/awsmarketplace/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/awsmarketplace/PricingUsageUnitForSave.md b/docs/awsmarketplace/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/awsmarketplace/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/awsmarketplace/ProrationBehavior.md b/docs/awsmarketplace/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/awsmarketplace/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/ProviderName.md b/docs/awsmarketplace/ProviderName.md new file mode 100644 index 0000000..b59bd95 --- /dev/null +++ b/docs/awsmarketplace/ProviderName.md @@ -0,0 +1,10 @@ +# ProviderName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/ProviderType.md b/docs/awsmarketplace/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/awsmarketplace/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/RecaptchaProps.md b/docs/awsmarketplace/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/awsmarketplace/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/awsmarketplace/RecurringInterval.md b/docs/awsmarketplace/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/awsmarketplace/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/RequestEmailUpdateParam.md b/docs/awsmarketplace/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/awsmarketplace/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/awsmarketplace/RequestExternalUserLinkParam.md b/docs/awsmarketplace/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/awsmarketplace/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/awsmarketplace/ResendSignUpConfirmationEmailParam.md b/docs/awsmarketplace/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/awsmarketplace/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/awsmarketplace/Role.md b/docs/awsmarketplace/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/awsmarketplace/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/awsmarketplace/RoleApi.md b/docs/awsmarketplace/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/awsmarketplace/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/Roles.md b/docs/awsmarketplace/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/awsmarketplace/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/awsmarketplace/SaasId.md b/docs/awsmarketplace/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/awsmarketplace/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/awsmarketplace/SaasUser.md b/docs/awsmarketplace/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/awsmarketplace/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/awsmarketplace/SaasUserApi.md b/docs/awsmarketplace/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/awsmarketplace/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/SaasUsers.md b/docs/awsmarketplace/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/awsmarketplace/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/awsmarketplace/SavePlanParam.md b/docs/awsmarketplace/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/awsmarketplace/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/awsmarketplace/SavePricingMenuParam.md b/docs/awsmarketplace/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/awsmarketplace/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/awsmarketplace/SavePricingPlanParam.md b/docs/awsmarketplace/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/awsmarketplace/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/awsmarketplace/SelfRegist.md b/docs/awsmarketplace/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/awsmarketplace/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/awsmarketplace/Settings.md b/docs/awsmarketplace/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/awsmarketplace/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/awsmarketplace/SignInSettings.md b/docs/awsmarketplace/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/awsmarketplace/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/awsmarketplace/SignUpParam.md b/docs/awsmarketplace/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/awsmarketplace/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/awsmarketplace/SignUpWithAwsMarketplaceParam.md b/docs/awsmarketplace/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/awsmarketplace/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/awsmarketplace/SingleTenantApi.md b/docs/awsmarketplace/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/awsmarketplace/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/SingleTenantSettings.md b/docs/awsmarketplace/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/awsmarketplace/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/awsmarketplace/SoftwareTokenSecretCode.md b/docs/awsmarketplace/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/awsmarketplace/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/awsmarketplace/StripeApi.md b/docs/awsmarketplace/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/awsmarketplace/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/StripeCustomer.md b/docs/awsmarketplace/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/awsmarketplace/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/awsmarketplace/StripeInfo.md b/docs/awsmarketplace/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/awsmarketplace/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/awsmarketplace/TaxRate.md b/docs/awsmarketplace/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/awsmarketplace/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/awsmarketplace/TaxRateApi.md b/docs/awsmarketplace/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/awsmarketplace/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/TaxRateProps.md b/docs/awsmarketplace/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/awsmarketplace/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/awsmarketplace/TaxRates.md b/docs/awsmarketplace/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/awsmarketplace/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/awsmarketplace/Tenant.md b/docs/awsmarketplace/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/awsmarketplace/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/awsmarketplace/TenantApi.md b/docs/awsmarketplace/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/awsmarketplace/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/TenantAttributeApi.md b/docs/awsmarketplace/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/awsmarketplace/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/TenantAttributes.md b/docs/awsmarketplace/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/awsmarketplace/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/awsmarketplace/TenantDetail.md b/docs/awsmarketplace/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/awsmarketplace/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/awsmarketplace/TenantIdentityProviderProps.md b/docs/awsmarketplace/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/awsmarketplace/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/awsmarketplace/TenantIdentityProviders.md b/docs/awsmarketplace/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/awsmarketplace/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/awsmarketplace/TenantIdentityProvidersSaml.md b/docs/awsmarketplace/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/awsmarketplace/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/awsmarketplace/TenantProps.md b/docs/awsmarketplace/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/awsmarketplace/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/awsmarketplace/TenantUserApi.md b/docs/awsmarketplace/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/awsmarketplace/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/Tenants.md b/docs/awsmarketplace/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/awsmarketplace/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/awsmarketplace/UnitType.md b/docs/awsmarketplace/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/awsmarketplace/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/UpdateBasicInfoParam.md b/docs/awsmarketplace/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/awsmarketplace/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/awsmarketplace/UpdateCustomizePageSettingsParam.md b/docs/awsmarketplace/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/awsmarketplace/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/awsmarketplace/UpdateCustomizePagesParam.md b/docs/awsmarketplace/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/awsmarketplace/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/awsmarketplace/UpdateEnvParam.md b/docs/awsmarketplace/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/awsmarketplace/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/awsmarketplace/UpdateFeedbackCommentParam.md b/docs/awsmarketplace/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/awsmarketplace/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/awsmarketplace/UpdateFeedbackParam.md b/docs/awsmarketplace/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/awsmarketplace/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/awsmarketplace/UpdateFeedbackStatusParam.md b/docs/awsmarketplace/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/awsmarketplace/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/awsmarketplace/UpdateIdentityProviderParam.md b/docs/awsmarketplace/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/awsmarketplace/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/awsmarketplace/UpdateListingStatusParam.md b/docs/awsmarketplace/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/awsmarketplace/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/awsmarketplace/UpdateMeteringUnitTimestampCountMethod.md b/docs/awsmarketplace/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/awsmarketplace/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/UpdateMeteringUnitTimestampCountNowParam.md b/docs/awsmarketplace/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/awsmarketplace/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/awsmarketplace/UpdateMeteringUnitTimestampCountParam.md b/docs/awsmarketplace/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/awsmarketplace/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/awsmarketplace/UpdateNotificationMessagesParam.md b/docs/awsmarketplace/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/awsmarketplace/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/awsmarketplace/UpdatePricingPlansUsedParam.md b/docs/awsmarketplace/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/awsmarketplace/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/awsmarketplace/UpdateSaasUserAttributesParam.md b/docs/awsmarketplace/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/awsmarketplace/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/awsmarketplace/UpdateSaasUserEmailParam.md b/docs/awsmarketplace/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/awsmarketplace/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/awsmarketplace/UpdateSaasUserPasswordParam.md b/docs/awsmarketplace/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/awsmarketplace/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/awsmarketplace/UpdateSettingsParam.md b/docs/awsmarketplace/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/awsmarketplace/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/awsmarketplace/UpdateSignInSettingsParam.md b/docs/awsmarketplace/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/awsmarketplace/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/awsmarketplace/UpdateSingleTenantSettingsParam.md b/docs/awsmarketplace/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/awsmarketplace/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/awsmarketplace/UpdateSoftwareTokenParam.md b/docs/awsmarketplace/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/awsmarketplace/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/awsmarketplace/UpdateStripeInfoParam.md b/docs/awsmarketplace/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/awsmarketplace/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/awsmarketplace/UpdateTaxRateParam.md b/docs/awsmarketplace/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/awsmarketplace/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/awsmarketplace/UpdateTenantIdentityProviderParam.md b/docs/awsmarketplace/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/awsmarketplace/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/awsmarketplace/UpdateTenantUserParam.md b/docs/awsmarketplace/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/awsmarketplace/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/awsmarketplace/User.md b/docs/awsmarketplace/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/awsmarketplace/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/awsmarketplace/UserAttributeApi.md b/docs/awsmarketplace/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/awsmarketplace/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/UserAttributes.md b/docs/awsmarketplace/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/awsmarketplace/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/awsmarketplace/UserAvailableEnv.md b/docs/awsmarketplace/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/awsmarketplace/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/awsmarketplace/UserAvailableTenant.md b/docs/awsmarketplace/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/awsmarketplace/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/awsmarketplace/UserInfo.md b/docs/awsmarketplace/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/awsmarketplace/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/awsmarketplace/UserInfoApi.md b/docs/awsmarketplace/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/awsmarketplace/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/awsmarketplace/Users.md b/docs/awsmarketplace/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/awsmarketplace/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/awsmarketplace/ValidateInvitationParam.md b/docs/awsmarketplace/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/awsmarketplace/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/awsmarketplace/VerifyRegistrationTokenParam.md b/docs/awsmarketplace/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/awsmarketplace/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/awsmarketplace/VisibilityStatus.md b/docs/awsmarketplace/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/awsmarketplace/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/awsmarketplace/Votes.md b/docs/awsmarketplace/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/awsmarketplace/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/billing/AccountVerification.md b/docs/billing/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/billing/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/billing/AggregateUsage.md b/docs/billing/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/billing/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/ApiKeys.md b/docs/billing/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/billing/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/billing/ApiLog.md b/docs/billing/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/billing/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/billing/ApiLogApi.md b/docs/billing/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/billing/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/ApiLogs.md b/docs/billing/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/billing/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/billing/Attribute.md b/docs/billing/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/billing/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/billing/AttributeType.md b/docs/billing/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/billing/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/AuthInfo.md b/docs/billing/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/billing/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/billing/AuthInfoApi.md b/docs/billing/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/billing/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/AuthorizationTempCode.md b/docs/billing/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/billing/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/billing/AwsMarketplaceApi.md b/docs/billing/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/billing/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/billing/AwsRegion.md b/docs/billing/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/billing/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/BasicInfo.md b/docs/billing/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/billing/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/billing/BasicInfoApi.md b/docs/billing/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/billing/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/BillingAddress.md b/docs/billing/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/billing/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/billing/BillingInfo.md b/docs/billing/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/billing/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/billing/CatalogEntityVisibility.md b/docs/billing/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/billing/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/billing/ClientSecret.md b/docs/billing/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/billing/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/billing/CloudFormationLaunchStackLink.md b/docs/billing/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/billing/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/billing/Comment.md b/docs/billing/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/billing/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/billing/Comments.md b/docs/billing/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/billing/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/billing/ConfirmEmailUpdateParam.md b/docs/billing/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/billing/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/billing/ConfirmExternalUserLinkParam.md b/docs/billing/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/billing/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/billing/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/billing/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/billing/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/billing/CreateCustomerParam.md b/docs/billing/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/billing/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/billing/CreateEventBridgeEventParam.md b/docs/billing/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/billing/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/billing/CreateFeedbackCommentParam.md b/docs/billing/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/billing/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/billing/CreateFeedbackParam.md b/docs/billing/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/billing/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/billing/CreateSaasUserParam.md b/docs/billing/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/billing/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/billing/CreateSecretCodeParam.md b/docs/billing/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/billing/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/billing/CreateTenantInvitationParam.md b/docs/billing/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/billing/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/billing/CreateTenantUserParam.md b/docs/billing/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/billing/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/billing/CreateTenantUserRolesParam.md b/docs/billing/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/billing/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/billing/CreateVoteUserParam.md b/docs/billing/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/billing/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/billing/CredentialApi.md b/docs/billing/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/billing/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/Credentials.md b/docs/billing/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/billing/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/billing/Currency.md b/docs/billing/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/billing/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/Customer.md b/docs/billing/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/billing/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/billing/Customers.md b/docs/billing/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/billing/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/billing/CustomizePageProps.md b/docs/billing/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/billing/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/billing/CustomizePageSettings.md b/docs/billing/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/billing/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/billing/CustomizePageSettingsProps.md b/docs/billing/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/billing/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/billing/CustomizePages.md b/docs/billing/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/billing/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/billing/DeviceConfiguration.md b/docs/billing/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/billing/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/billing/DnsRecord.md b/docs/billing/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/billing/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/billing/Env.md b/docs/billing/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/billing/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/billing/EnvApi.md b/docs/billing/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/billing/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/Envs.md b/docs/billing/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/billing/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/billing/Error.md b/docs/billing/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/billing/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/billing/ErrorApi.md b/docs/billing/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/billing/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/billing/EventBridgeApi.md b/docs/billing/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/billing/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/EventBridgeSettings.md b/docs/billing/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/billing/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/billing/EventMessage.md b/docs/billing/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/billing/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/billing/Feedback.md b/docs/billing/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/billing/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/billing/FeedbackApi.md b/docs/billing/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/billing/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/FeedbackSaveProps.md b/docs/billing/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/billing/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/billing/Feedbacks.md b/docs/billing/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/billing/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/billing/GetListingStatusResult.md b/docs/billing/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/billing/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/billing/IdentityProviderConfiguration.md b/docs/billing/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/billing/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/billing/IdentityProviderProps.md b/docs/billing/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/billing/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/billing/IdentityProviderSaml.md b/docs/billing/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/billing/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/billing/IdentityProviders.md b/docs/billing/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/billing/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/billing/Invitation.md b/docs/billing/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/billing/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/billing/InvitationApi.md b/docs/billing/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/billing/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/InvitationStatus.md b/docs/billing/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/billing/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/InvitationValidity.md b/docs/billing/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/billing/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/billing/Invitations.md b/docs/billing/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/billing/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/billing/InvitedUserEnvironmentInformationInner.md b/docs/billing/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/billing/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/billing/InvoiceLanguage.md b/docs/billing/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/billing/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/LinkAwsMarketplaceParam.md b/docs/billing/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/billing/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/billing/ListingStatus.md b/docs/billing/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/billing/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/MessageTemplate.md b/docs/billing/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/billing/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/billing/MeteringApi.md b/docs/billing/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/billing/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/MeteringUnit.md b/docs/billing/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/billing/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/billing/MeteringUnitCount.md b/docs/billing/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/billing/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/billing/MeteringUnitDateCount.md b/docs/billing/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/billing/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/billing/MeteringUnitDateCounts.md b/docs/billing/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/billing/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/billing/MeteringUnitDatePeriodCounts.md b/docs/billing/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/billing/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/billing/MeteringUnitMonthCount.md b/docs/billing/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/billing/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/billing/MeteringUnitMonthCounts.md b/docs/billing/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/billing/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/billing/MeteringUnitProps.md b/docs/billing/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/billing/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/billing/MeteringUnitTimestampCount.md b/docs/billing/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/billing/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/billing/MeteringUnits.md b/docs/billing/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/billing/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/billing/MfaConfiguration.md b/docs/billing/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/billing/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/billing/MfaPreference.md b/docs/billing/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/billing/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/billing/NotificationMessages.md b/docs/billing/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/billing/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/billing/PasswordPolicy.md b/docs/billing/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/billing/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/billing/Plan.md b/docs/billing/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/billing/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/billing/PlanHistories.md b/docs/billing/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/billing/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/billing/PlanHistory.md b/docs/billing/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/billing/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/billing/PlanReservation.md b/docs/billing/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/billing/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/billing/Plans.md b/docs/billing/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/billing/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/billing/PricingFixedUnit.md b/docs/billing/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/billing/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/billing/PricingFixedUnitForSave.md b/docs/billing/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/billing/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/billing/PricingMenu.md b/docs/billing/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/billing/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/billing/PricingMenuProps.md b/docs/billing/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/billing/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/billing/PricingMenus.md b/docs/billing/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/billing/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/billing/PricingMenusApi.md b/docs/billing/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/billing/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/PricingPlan.md b/docs/billing/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/billing/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/billing/PricingPlanProps.md b/docs/billing/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/billing/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/billing/PricingPlans.md b/docs/billing/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/billing/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/billing/PricingPlansApi.md b/docs/billing/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/billing/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/PricingTier.md b/docs/billing/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/billing/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/billing/PricingTieredUnit.md b/docs/billing/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/billing/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/billing/PricingTieredUnitForSave.md b/docs/billing/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/billing/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/billing/PricingTieredUsageUnit.md b/docs/billing/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/billing/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/billing/PricingTieredUsageUnitForSave.md b/docs/billing/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/billing/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/billing/PricingTiers.md b/docs/billing/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/billing/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/billing/PricingUnit.md b/docs/billing/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/billing/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/billing/PricingUnitBaseProps.md b/docs/billing/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/billing/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/billing/PricingUnitForSave.md b/docs/billing/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/billing/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/billing/PricingUnits.md b/docs/billing/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/billing/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/billing/PricingUnitsApi.md b/docs/billing/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/billing/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/PricingUsageUnit.md b/docs/billing/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/billing/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/billing/PricingUsageUnitForSave.md b/docs/billing/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/billing/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/billing/ProrationBehavior.md b/docs/billing/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/billing/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/ProviderName.md b/docs/billing/ProviderName.md new file mode 100644 index 0000000..b59bd95 --- /dev/null +++ b/docs/billing/ProviderName.md @@ -0,0 +1,10 @@ +# ProviderName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/ProviderType.md b/docs/billing/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/billing/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/RecaptchaProps.md b/docs/billing/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/billing/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/billing/RecurringInterval.md b/docs/billing/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/billing/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/RequestEmailUpdateParam.md b/docs/billing/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/billing/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/billing/RequestExternalUserLinkParam.md b/docs/billing/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/billing/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/billing/ResendSignUpConfirmationEmailParam.md b/docs/billing/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/billing/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/billing/Role.md b/docs/billing/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/billing/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/billing/RoleApi.md b/docs/billing/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/billing/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/Roles.md b/docs/billing/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/billing/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/billing/SaasId.md b/docs/billing/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/billing/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/billing/SaasUser.md b/docs/billing/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/billing/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/billing/SaasUserApi.md b/docs/billing/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/billing/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/SaasUsers.md b/docs/billing/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/billing/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/billing/SavePlanParam.md b/docs/billing/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/billing/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/billing/SavePricingMenuParam.md b/docs/billing/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/billing/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/billing/SavePricingPlanParam.md b/docs/billing/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/billing/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/billing/SelfRegist.md b/docs/billing/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/billing/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/billing/Settings.md b/docs/billing/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/billing/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/billing/SignInSettings.md b/docs/billing/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/billing/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/billing/SignUpParam.md b/docs/billing/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/billing/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/billing/SignUpWithAwsMarketplaceParam.md b/docs/billing/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/billing/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/billing/SingleTenantApi.md b/docs/billing/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/billing/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/billing/SingleTenantSettings.md b/docs/billing/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/billing/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/billing/SoftwareTokenSecretCode.md b/docs/billing/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/billing/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/billing/StripeApi.md b/docs/billing/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/billing/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/StripeCustomer.md b/docs/billing/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/billing/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/billing/StripeInfo.md b/docs/billing/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/billing/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/billing/TaxRate.md b/docs/billing/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/billing/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/billing/TaxRateApi.md b/docs/billing/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/billing/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/billing/TaxRateProps.md b/docs/billing/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/billing/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/billing/TaxRates.md b/docs/billing/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/billing/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/billing/Tenant.md b/docs/billing/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/billing/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/billing/TenantApi.md b/docs/billing/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/billing/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/TenantAttributeApi.md b/docs/billing/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/billing/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/TenantAttributes.md b/docs/billing/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/billing/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/billing/TenantDetail.md b/docs/billing/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/billing/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/billing/TenantIdentityProviderProps.md b/docs/billing/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/billing/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/billing/TenantIdentityProviders.md b/docs/billing/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/billing/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/billing/TenantIdentityProvidersSaml.md b/docs/billing/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/billing/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/billing/TenantProps.md b/docs/billing/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/billing/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/billing/TenantUserApi.md b/docs/billing/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/billing/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/Tenants.md b/docs/billing/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/billing/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/billing/UnitType.md b/docs/billing/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/billing/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/UpdateBasicInfoParam.md b/docs/billing/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/billing/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/billing/UpdateCustomizePageSettingsParam.md b/docs/billing/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/billing/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/billing/UpdateCustomizePagesParam.md b/docs/billing/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/billing/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/billing/UpdateEnvParam.md b/docs/billing/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/billing/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/billing/UpdateFeedbackCommentParam.md b/docs/billing/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/billing/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/billing/UpdateFeedbackParam.md b/docs/billing/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/billing/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/billing/UpdateFeedbackStatusParam.md b/docs/billing/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/billing/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/billing/UpdateIdentityProviderParam.md b/docs/billing/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/billing/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/billing/UpdateListingStatusParam.md b/docs/billing/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/billing/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/billing/UpdateMeteringUnitTimestampCountMethod.md b/docs/billing/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/billing/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/UpdateMeteringUnitTimestampCountNowParam.md b/docs/billing/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/billing/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/billing/UpdateMeteringUnitTimestampCountParam.md b/docs/billing/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/billing/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/billing/UpdateNotificationMessagesParam.md b/docs/billing/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/billing/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/billing/UpdatePricingPlansUsedParam.md b/docs/billing/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/billing/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/billing/UpdateSaasUserAttributesParam.md b/docs/billing/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/billing/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/billing/UpdateSaasUserEmailParam.md b/docs/billing/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/billing/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/billing/UpdateSaasUserPasswordParam.md b/docs/billing/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/billing/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/billing/UpdateSettingsParam.md b/docs/billing/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/billing/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/billing/UpdateSignInSettingsParam.md b/docs/billing/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/billing/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/billing/UpdateSingleTenantSettingsParam.md b/docs/billing/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/billing/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/billing/UpdateSoftwareTokenParam.md b/docs/billing/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/billing/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/billing/UpdateStripeInfoParam.md b/docs/billing/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/billing/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/billing/UpdateTaxRateParam.md b/docs/billing/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/billing/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/billing/UpdateTenantIdentityProviderParam.md b/docs/billing/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/billing/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/billing/UpdateTenantUserParam.md b/docs/billing/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/billing/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/billing/User.md b/docs/billing/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/billing/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/billing/UserAttributeApi.md b/docs/billing/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/billing/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/billing/UserAttributes.md b/docs/billing/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/billing/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/billing/UserAvailableEnv.md b/docs/billing/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/billing/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/billing/UserAvailableTenant.md b/docs/billing/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/billing/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/billing/UserInfo.md b/docs/billing/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/billing/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/billing/UserInfoApi.md b/docs/billing/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/billing/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/billing/Users.md b/docs/billing/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/billing/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/billing/ValidateInvitationParam.md b/docs/billing/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/billing/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/billing/VerifyRegistrationTokenParam.md b/docs/billing/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/billing/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/billing/VisibilityStatus.md b/docs/billing/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/billing/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/billing/Votes.md b/docs/billing/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/billing/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/communication/AccountVerification.md b/docs/communication/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/communication/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/communication/AggregateUsage.md b/docs/communication/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/communication/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/ApiKeys.md b/docs/communication/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/communication/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/communication/ApiLog.md b/docs/communication/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/communication/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/communication/ApiLogApi.md b/docs/communication/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/communication/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/ApiLogs.md b/docs/communication/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/communication/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/communication/Attribute.md b/docs/communication/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/communication/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/communication/AttributeType.md b/docs/communication/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/communication/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/AuthInfo.md b/docs/communication/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/communication/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/communication/AuthInfoApi.md b/docs/communication/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/communication/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/AuthorizationTempCode.md b/docs/communication/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/communication/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/communication/AwsMarketplaceApi.md b/docs/communication/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/communication/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/communication/AwsRegion.md b/docs/communication/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/communication/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/BasicInfo.md b/docs/communication/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/communication/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/communication/BasicInfoApi.md b/docs/communication/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/communication/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/BillingAddress.md b/docs/communication/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/communication/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/communication/BillingInfo.md b/docs/communication/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/communication/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/communication/CatalogEntityVisibility.md b/docs/communication/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/communication/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/communication/ClientSecret.md b/docs/communication/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/communication/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/communication/CloudFormationLaunchStackLink.md b/docs/communication/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/communication/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/communication/Comment.md b/docs/communication/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/communication/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/communication/Comments.md b/docs/communication/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/communication/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/communication/ConfirmEmailUpdateParam.md b/docs/communication/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/communication/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/communication/ConfirmExternalUserLinkParam.md b/docs/communication/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/communication/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/communication/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/communication/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/communication/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/communication/CreateCustomerParam.md b/docs/communication/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/communication/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/communication/CreateEventBridgeEventParam.md b/docs/communication/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/communication/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/communication/CreateFeedbackCommentParam.md b/docs/communication/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/communication/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/communication/CreateFeedbackParam.md b/docs/communication/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/communication/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/communication/CreateSaasUserParam.md b/docs/communication/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/communication/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/communication/CreateSecretCodeParam.md b/docs/communication/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/communication/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/communication/CreateTenantInvitationParam.md b/docs/communication/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/communication/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/communication/CreateTenantUserParam.md b/docs/communication/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/communication/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/communication/CreateTenantUserRolesParam.md b/docs/communication/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/communication/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/communication/CreateVoteUserParam.md b/docs/communication/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/communication/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/communication/CredentialApi.md b/docs/communication/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/communication/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/Credentials.md b/docs/communication/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/communication/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/communication/Currency.md b/docs/communication/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/communication/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/Customer.md b/docs/communication/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/communication/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/communication/Customers.md b/docs/communication/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/communication/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/communication/CustomizePageProps.md b/docs/communication/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/communication/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/communication/CustomizePageSettings.md b/docs/communication/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/communication/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/communication/CustomizePageSettingsProps.md b/docs/communication/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/communication/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/communication/CustomizePages.md b/docs/communication/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/communication/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/communication/DeviceConfiguration.md b/docs/communication/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/communication/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/communication/DnsRecord.md b/docs/communication/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/communication/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/communication/Env.md b/docs/communication/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/communication/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/communication/EnvApi.md b/docs/communication/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/communication/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/Envs.md b/docs/communication/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/communication/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/communication/Error.md b/docs/communication/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/communication/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/communication/ErrorApi.md b/docs/communication/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/communication/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/communication/EventBridgeApi.md b/docs/communication/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/communication/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/EventBridgeSettings.md b/docs/communication/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/communication/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/communication/EventMessage.md b/docs/communication/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/communication/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/communication/Feedback.md b/docs/communication/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/communication/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/communication/FeedbackApi.md b/docs/communication/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/communication/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/FeedbackSaveProps.md b/docs/communication/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/communication/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/communication/Feedbacks.md b/docs/communication/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/communication/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/communication/GetListingStatusResult.md b/docs/communication/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/communication/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/communication/IdentityProviderConfiguration.md b/docs/communication/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/communication/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/communication/IdentityProviderProps.md b/docs/communication/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/communication/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/communication/IdentityProviderSaml.md b/docs/communication/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/communication/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/communication/IdentityProviders.md b/docs/communication/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/communication/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/communication/Invitation.md b/docs/communication/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/communication/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/communication/InvitationApi.md b/docs/communication/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/communication/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/InvitationStatus.md b/docs/communication/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/communication/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/InvitationValidity.md b/docs/communication/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/communication/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/communication/Invitations.md b/docs/communication/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/communication/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/communication/InvitedUserEnvironmentInformationInner.md b/docs/communication/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/communication/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/communication/InvoiceLanguage.md b/docs/communication/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/communication/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/LinkAwsMarketplaceParam.md b/docs/communication/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/communication/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/communication/ListingStatus.md b/docs/communication/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/communication/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/MessageTemplate.md b/docs/communication/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/communication/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/communication/MeteringApi.md b/docs/communication/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/communication/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/MeteringUnit.md b/docs/communication/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/communication/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/communication/MeteringUnitCount.md b/docs/communication/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/communication/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/communication/MeteringUnitDateCount.md b/docs/communication/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/communication/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/communication/MeteringUnitDateCounts.md b/docs/communication/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/communication/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/communication/MeteringUnitDatePeriodCounts.md b/docs/communication/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/communication/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/communication/MeteringUnitMonthCount.md b/docs/communication/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/communication/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/communication/MeteringUnitMonthCounts.md b/docs/communication/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/communication/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/communication/MeteringUnitProps.md b/docs/communication/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/communication/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/communication/MeteringUnitTimestampCount.md b/docs/communication/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/communication/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/communication/MeteringUnits.md b/docs/communication/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/communication/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/communication/MfaConfiguration.md b/docs/communication/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/communication/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/communication/MfaPreference.md b/docs/communication/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/communication/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/communication/NotificationMessages.md b/docs/communication/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/communication/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/communication/PasswordPolicy.md b/docs/communication/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/communication/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/communication/Plan.md b/docs/communication/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/communication/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/communication/PlanHistories.md b/docs/communication/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/communication/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/communication/PlanHistory.md b/docs/communication/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/communication/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/communication/PlanReservation.md b/docs/communication/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/communication/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/communication/Plans.md b/docs/communication/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/communication/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/communication/PricingFixedUnit.md b/docs/communication/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/communication/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/communication/PricingFixedUnitForSave.md b/docs/communication/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/communication/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/communication/PricingMenu.md b/docs/communication/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/communication/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/communication/PricingMenuProps.md b/docs/communication/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/communication/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/communication/PricingMenus.md b/docs/communication/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/communication/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/communication/PricingMenusApi.md b/docs/communication/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/communication/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/PricingPlan.md b/docs/communication/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/communication/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/communication/PricingPlanProps.md b/docs/communication/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/communication/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/communication/PricingPlans.md b/docs/communication/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/communication/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/communication/PricingPlansApi.md b/docs/communication/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/communication/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/PricingTier.md b/docs/communication/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/communication/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/communication/PricingTieredUnit.md b/docs/communication/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/communication/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/communication/PricingTieredUnitForSave.md b/docs/communication/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/communication/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/communication/PricingTieredUsageUnit.md b/docs/communication/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/communication/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/communication/PricingTieredUsageUnitForSave.md b/docs/communication/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/communication/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/communication/PricingTiers.md b/docs/communication/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/communication/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/communication/PricingUnit.md b/docs/communication/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/communication/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/communication/PricingUnitBaseProps.md b/docs/communication/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/communication/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/communication/PricingUnitForSave.md b/docs/communication/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/communication/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/communication/PricingUnits.md b/docs/communication/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/communication/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/communication/PricingUnitsApi.md b/docs/communication/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/communication/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/PricingUsageUnit.md b/docs/communication/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/communication/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/communication/PricingUsageUnitForSave.md b/docs/communication/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/communication/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/communication/ProrationBehavior.md b/docs/communication/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/communication/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/ProviderName.md b/docs/communication/ProviderName.md new file mode 100644 index 0000000..b59bd95 --- /dev/null +++ b/docs/communication/ProviderName.md @@ -0,0 +1,10 @@ +# ProviderName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/ProviderType.md b/docs/communication/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/communication/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/RecaptchaProps.md b/docs/communication/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/communication/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/communication/RecurringInterval.md b/docs/communication/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/communication/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/RequestEmailUpdateParam.md b/docs/communication/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/communication/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/communication/RequestExternalUserLinkParam.md b/docs/communication/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/communication/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/communication/ResendSignUpConfirmationEmailParam.md b/docs/communication/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/communication/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/communication/Role.md b/docs/communication/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/communication/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/communication/RoleApi.md b/docs/communication/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/communication/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/Roles.md b/docs/communication/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/communication/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/communication/SaasId.md b/docs/communication/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/communication/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/communication/SaasUser.md b/docs/communication/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/communication/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/communication/SaasUserApi.md b/docs/communication/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/communication/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/SaasUsers.md b/docs/communication/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/communication/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/communication/SavePlanParam.md b/docs/communication/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/communication/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/communication/SavePricingMenuParam.md b/docs/communication/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/communication/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/communication/SavePricingPlanParam.md b/docs/communication/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/communication/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/communication/SelfRegist.md b/docs/communication/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/communication/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/communication/Settings.md b/docs/communication/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/communication/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/communication/SignInSettings.md b/docs/communication/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/communication/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/communication/SignUpParam.md b/docs/communication/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/communication/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/communication/SignUpWithAwsMarketplaceParam.md b/docs/communication/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/communication/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/communication/SingleTenantApi.md b/docs/communication/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/communication/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/communication/SingleTenantSettings.md b/docs/communication/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/communication/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/communication/SoftwareTokenSecretCode.md b/docs/communication/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/communication/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/communication/StripeApi.md b/docs/communication/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/communication/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/StripeCustomer.md b/docs/communication/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/communication/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/communication/StripeInfo.md b/docs/communication/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/communication/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/communication/TaxRate.md b/docs/communication/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/communication/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/communication/TaxRateApi.md b/docs/communication/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/communication/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/communication/TaxRateProps.md b/docs/communication/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/communication/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/communication/TaxRates.md b/docs/communication/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/communication/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/communication/Tenant.md b/docs/communication/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/communication/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/communication/TenantApi.md b/docs/communication/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/communication/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/TenantAttributeApi.md b/docs/communication/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/communication/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/TenantAttributes.md b/docs/communication/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/communication/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/communication/TenantDetail.md b/docs/communication/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/communication/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/communication/TenantIdentityProviderProps.md b/docs/communication/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/communication/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/communication/TenantIdentityProviders.md b/docs/communication/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/communication/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/communication/TenantIdentityProvidersSaml.md b/docs/communication/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/communication/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/communication/TenantProps.md b/docs/communication/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/communication/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/communication/TenantUserApi.md b/docs/communication/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/communication/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/Tenants.md b/docs/communication/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/communication/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/communication/UnitType.md b/docs/communication/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/communication/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/UpdateBasicInfoParam.md b/docs/communication/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/communication/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/communication/UpdateCustomizePageSettingsParam.md b/docs/communication/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/communication/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/communication/UpdateCustomizePagesParam.md b/docs/communication/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/communication/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/communication/UpdateEnvParam.md b/docs/communication/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/communication/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/communication/UpdateFeedbackCommentParam.md b/docs/communication/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/communication/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/communication/UpdateFeedbackParam.md b/docs/communication/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/communication/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/communication/UpdateFeedbackStatusParam.md b/docs/communication/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/communication/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/communication/UpdateIdentityProviderParam.md b/docs/communication/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/communication/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/communication/UpdateListingStatusParam.md b/docs/communication/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/communication/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/communication/UpdateMeteringUnitTimestampCountMethod.md b/docs/communication/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/communication/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/UpdateMeteringUnitTimestampCountNowParam.md b/docs/communication/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/communication/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/communication/UpdateMeteringUnitTimestampCountParam.md b/docs/communication/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/communication/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/communication/UpdateNotificationMessagesParam.md b/docs/communication/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/communication/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/communication/UpdatePricingPlansUsedParam.md b/docs/communication/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/communication/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/communication/UpdateSaasUserAttributesParam.md b/docs/communication/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/communication/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/communication/UpdateSaasUserEmailParam.md b/docs/communication/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/communication/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/communication/UpdateSaasUserPasswordParam.md b/docs/communication/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/communication/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/communication/UpdateSettingsParam.md b/docs/communication/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/communication/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/communication/UpdateSignInSettingsParam.md b/docs/communication/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/communication/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/communication/UpdateSingleTenantSettingsParam.md b/docs/communication/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/communication/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/communication/UpdateSoftwareTokenParam.md b/docs/communication/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/communication/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/communication/UpdateStripeInfoParam.md b/docs/communication/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/communication/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/communication/UpdateTaxRateParam.md b/docs/communication/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/communication/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/communication/UpdateTenantIdentityProviderParam.md b/docs/communication/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/communication/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/communication/UpdateTenantUserParam.md b/docs/communication/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/communication/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/communication/User.md b/docs/communication/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/communication/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/communication/UserAttributeApi.md b/docs/communication/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/communication/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/communication/UserAttributes.md b/docs/communication/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/communication/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/communication/UserAvailableEnv.md b/docs/communication/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/communication/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/communication/UserAvailableTenant.md b/docs/communication/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/communication/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/communication/UserInfo.md b/docs/communication/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/communication/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/communication/UserInfoApi.md b/docs/communication/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/communication/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/communication/Users.md b/docs/communication/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/communication/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/communication/ValidateInvitationParam.md b/docs/communication/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/communication/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/communication/VerifyRegistrationTokenParam.md b/docs/communication/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/communication/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/communication/VisibilityStatus.md b/docs/communication/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/communication/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/communication/Votes.md b/docs/communication/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/communication/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/integration/AccountVerification.md b/docs/integration/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/integration/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/integration/AggregateUsage.md b/docs/integration/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/integration/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/ApiKeys.md b/docs/integration/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/integration/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/integration/ApiLog.md b/docs/integration/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/integration/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/integration/ApiLogApi.md b/docs/integration/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/integration/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/ApiLogs.md b/docs/integration/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/integration/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/integration/Attribute.md b/docs/integration/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/integration/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/integration/AttributeType.md b/docs/integration/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/integration/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/AuthInfo.md b/docs/integration/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/integration/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/integration/AuthInfoApi.md b/docs/integration/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/integration/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/AuthorizationTempCode.md b/docs/integration/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/integration/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/integration/AwsMarketplaceApi.md b/docs/integration/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/integration/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/integration/AwsRegion.md b/docs/integration/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/integration/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/BasicInfo.md b/docs/integration/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/integration/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/integration/BasicInfoApi.md b/docs/integration/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/integration/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/BillingAddress.md b/docs/integration/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/integration/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/integration/BillingInfo.md b/docs/integration/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/integration/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/integration/CatalogEntityVisibility.md b/docs/integration/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/integration/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/integration/ClientSecret.md b/docs/integration/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/integration/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/integration/CloudFormationLaunchStackLink.md b/docs/integration/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/integration/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/integration/Comment.md b/docs/integration/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/integration/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/integration/Comments.md b/docs/integration/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/integration/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/integration/ConfirmEmailUpdateParam.md b/docs/integration/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/integration/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/integration/ConfirmExternalUserLinkParam.md b/docs/integration/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/integration/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/integration/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/integration/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/integration/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/integration/CreateCustomerParam.md b/docs/integration/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/integration/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/integration/CreateEventBridgeEventParam.md b/docs/integration/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/integration/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/integration/CreateFeedbackCommentParam.md b/docs/integration/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/integration/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/integration/CreateFeedbackParam.md b/docs/integration/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/integration/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/integration/CreateSaasUserParam.md b/docs/integration/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/integration/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/integration/CreateSecretCodeParam.md b/docs/integration/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/integration/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/integration/CreateTenantInvitationParam.md b/docs/integration/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/integration/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/integration/CreateTenantUserParam.md b/docs/integration/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/integration/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/integration/CreateTenantUserRolesParam.md b/docs/integration/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/integration/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/integration/CreateVoteUserParam.md b/docs/integration/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/integration/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/integration/CredentialApi.md b/docs/integration/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/integration/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/Credentials.md b/docs/integration/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/integration/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/integration/Currency.md b/docs/integration/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/integration/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/Customer.md b/docs/integration/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/integration/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/integration/Customers.md b/docs/integration/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/integration/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/integration/CustomizePageProps.md b/docs/integration/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/integration/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/integration/CustomizePageSettings.md b/docs/integration/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/integration/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/integration/CustomizePageSettingsProps.md b/docs/integration/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/integration/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/integration/CustomizePages.md b/docs/integration/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/integration/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/integration/DeviceConfiguration.md b/docs/integration/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/integration/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/integration/DnsRecord.md b/docs/integration/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/integration/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/integration/Env.md b/docs/integration/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/integration/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/integration/EnvApi.md b/docs/integration/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/integration/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/Envs.md b/docs/integration/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/integration/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/integration/Error.md b/docs/integration/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/integration/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/integration/ErrorApi.md b/docs/integration/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/integration/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/integration/EventBridgeApi.md b/docs/integration/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/integration/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/EventBridgeSettings.md b/docs/integration/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/integration/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/integration/EventMessage.md b/docs/integration/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/integration/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/integration/Feedback.md b/docs/integration/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/integration/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/integration/FeedbackApi.md b/docs/integration/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/integration/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/FeedbackSaveProps.md b/docs/integration/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/integration/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/integration/Feedbacks.md b/docs/integration/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/integration/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/integration/GetListingStatusResult.md b/docs/integration/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/integration/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/integration/IdentityProviderConfiguration.md b/docs/integration/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/integration/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/integration/IdentityProviderProps.md b/docs/integration/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/integration/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/integration/IdentityProviderSaml.md b/docs/integration/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/integration/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/integration/IdentityProviders.md b/docs/integration/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/integration/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/integration/Invitation.md b/docs/integration/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/integration/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/integration/InvitationApi.md b/docs/integration/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/integration/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/InvitationStatus.md b/docs/integration/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/integration/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/InvitationValidity.md b/docs/integration/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/integration/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/integration/Invitations.md b/docs/integration/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/integration/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/integration/InvitedUserEnvironmentInformationInner.md b/docs/integration/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/integration/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/integration/InvoiceLanguage.md b/docs/integration/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/integration/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/LinkAwsMarketplaceParam.md b/docs/integration/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/integration/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/integration/ListingStatus.md b/docs/integration/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/integration/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/MessageTemplate.md b/docs/integration/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/integration/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/integration/MeteringApi.md b/docs/integration/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/integration/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/MeteringUnit.md b/docs/integration/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/integration/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/integration/MeteringUnitCount.md b/docs/integration/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/integration/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/integration/MeteringUnitDateCount.md b/docs/integration/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/integration/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/integration/MeteringUnitDateCounts.md b/docs/integration/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/integration/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/integration/MeteringUnitDatePeriodCounts.md b/docs/integration/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/integration/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/integration/MeteringUnitMonthCount.md b/docs/integration/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/integration/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/integration/MeteringUnitMonthCounts.md b/docs/integration/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/integration/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/integration/MeteringUnitProps.md b/docs/integration/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/integration/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/integration/MeteringUnitTimestampCount.md b/docs/integration/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/integration/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/integration/MeteringUnits.md b/docs/integration/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/integration/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/integration/MfaConfiguration.md b/docs/integration/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/integration/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/integration/MfaPreference.md b/docs/integration/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/integration/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/integration/NotificationMessages.md b/docs/integration/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/integration/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/integration/PasswordPolicy.md b/docs/integration/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/integration/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/integration/Plan.md b/docs/integration/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/integration/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/integration/PlanHistories.md b/docs/integration/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/integration/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/integration/PlanHistory.md b/docs/integration/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/integration/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/integration/PlanReservation.md b/docs/integration/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/integration/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/integration/Plans.md b/docs/integration/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/integration/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/integration/PricingFixedUnit.md b/docs/integration/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/integration/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/integration/PricingFixedUnitForSave.md b/docs/integration/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/integration/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/integration/PricingMenu.md b/docs/integration/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/integration/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/integration/PricingMenuProps.md b/docs/integration/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/integration/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/integration/PricingMenus.md b/docs/integration/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/integration/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/integration/PricingMenusApi.md b/docs/integration/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/integration/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/PricingPlan.md b/docs/integration/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/integration/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/integration/PricingPlanProps.md b/docs/integration/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/integration/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/integration/PricingPlans.md b/docs/integration/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/integration/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/integration/PricingPlansApi.md b/docs/integration/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/integration/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/PricingTier.md b/docs/integration/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/integration/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/integration/PricingTieredUnit.md b/docs/integration/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/integration/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/integration/PricingTieredUnitForSave.md b/docs/integration/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/integration/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/integration/PricingTieredUsageUnit.md b/docs/integration/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/integration/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/integration/PricingTieredUsageUnitForSave.md b/docs/integration/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/integration/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/integration/PricingTiers.md b/docs/integration/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/integration/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/integration/PricingUnit.md b/docs/integration/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/integration/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/integration/PricingUnitBaseProps.md b/docs/integration/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/integration/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/integration/PricingUnitForSave.md b/docs/integration/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/integration/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/integration/PricingUnits.md b/docs/integration/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/integration/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/integration/PricingUnitsApi.md b/docs/integration/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/integration/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/PricingUsageUnit.md b/docs/integration/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/integration/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/integration/PricingUsageUnitForSave.md b/docs/integration/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/integration/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/integration/ProrationBehavior.md b/docs/integration/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/integration/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/ProviderName.md b/docs/integration/ProviderName.md new file mode 100644 index 0000000..b59bd95 --- /dev/null +++ b/docs/integration/ProviderName.md @@ -0,0 +1,10 @@ +# ProviderName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/ProviderType.md b/docs/integration/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/integration/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/RecaptchaProps.md b/docs/integration/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/integration/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/integration/RecurringInterval.md b/docs/integration/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/integration/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/RequestEmailUpdateParam.md b/docs/integration/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/integration/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/integration/RequestExternalUserLinkParam.md b/docs/integration/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/integration/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/integration/ResendSignUpConfirmationEmailParam.md b/docs/integration/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/integration/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/integration/Role.md b/docs/integration/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/integration/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/integration/RoleApi.md b/docs/integration/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/integration/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/Roles.md b/docs/integration/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/integration/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/integration/SaasId.md b/docs/integration/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/integration/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/integration/SaasUser.md b/docs/integration/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/integration/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/integration/SaasUserApi.md b/docs/integration/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/integration/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/SaasUsers.md b/docs/integration/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/integration/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/integration/SavePlanParam.md b/docs/integration/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/integration/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/integration/SavePricingMenuParam.md b/docs/integration/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/integration/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/integration/SavePricingPlanParam.md b/docs/integration/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/integration/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/integration/SelfRegist.md b/docs/integration/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/integration/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/integration/Settings.md b/docs/integration/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/integration/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/integration/SignInSettings.md b/docs/integration/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/integration/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/integration/SignUpParam.md b/docs/integration/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/integration/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/integration/SignUpWithAwsMarketplaceParam.md b/docs/integration/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/integration/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/integration/SingleTenantApi.md b/docs/integration/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/integration/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/integration/SingleTenantSettings.md b/docs/integration/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/integration/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/integration/SoftwareTokenSecretCode.md b/docs/integration/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/integration/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/integration/StripeApi.md b/docs/integration/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/integration/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/StripeCustomer.md b/docs/integration/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/integration/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/integration/StripeInfo.md b/docs/integration/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/integration/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/integration/TaxRate.md b/docs/integration/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/integration/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/integration/TaxRateApi.md b/docs/integration/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/integration/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/integration/TaxRateProps.md b/docs/integration/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/integration/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/integration/TaxRates.md b/docs/integration/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/integration/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/integration/Tenant.md b/docs/integration/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/integration/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/integration/TenantApi.md b/docs/integration/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/integration/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/TenantAttributeApi.md b/docs/integration/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/integration/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/TenantAttributes.md b/docs/integration/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/integration/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/integration/TenantDetail.md b/docs/integration/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/integration/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/integration/TenantIdentityProviderProps.md b/docs/integration/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/integration/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/integration/TenantIdentityProviders.md b/docs/integration/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/integration/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/integration/TenantIdentityProvidersSaml.md b/docs/integration/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/integration/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/integration/TenantProps.md b/docs/integration/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/integration/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/integration/TenantUserApi.md b/docs/integration/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/integration/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/Tenants.md b/docs/integration/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/integration/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/integration/UnitType.md b/docs/integration/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/integration/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/UpdateBasicInfoParam.md b/docs/integration/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/integration/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/integration/UpdateCustomizePageSettingsParam.md b/docs/integration/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/integration/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/integration/UpdateCustomizePagesParam.md b/docs/integration/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/integration/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/integration/UpdateEnvParam.md b/docs/integration/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/integration/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/integration/UpdateFeedbackCommentParam.md b/docs/integration/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/integration/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/integration/UpdateFeedbackParam.md b/docs/integration/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/integration/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/integration/UpdateFeedbackStatusParam.md b/docs/integration/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/integration/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/integration/UpdateIdentityProviderParam.md b/docs/integration/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/integration/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/integration/UpdateListingStatusParam.md b/docs/integration/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/integration/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/integration/UpdateMeteringUnitTimestampCountMethod.md b/docs/integration/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/integration/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/UpdateMeteringUnitTimestampCountNowParam.md b/docs/integration/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/integration/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/integration/UpdateMeteringUnitTimestampCountParam.md b/docs/integration/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/integration/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/integration/UpdateNotificationMessagesParam.md b/docs/integration/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/integration/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/integration/UpdatePricingPlansUsedParam.md b/docs/integration/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/integration/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/integration/UpdateSaasUserAttributesParam.md b/docs/integration/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/integration/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/integration/UpdateSaasUserEmailParam.md b/docs/integration/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/integration/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/integration/UpdateSaasUserPasswordParam.md b/docs/integration/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/integration/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/integration/UpdateSettingsParam.md b/docs/integration/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/integration/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/integration/UpdateSignInSettingsParam.md b/docs/integration/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/integration/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/integration/UpdateSingleTenantSettingsParam.md b/docs/integration/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/integration/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/integration/UpdateSoftwareTokenParam.md b/docs/integration/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/integration/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/integration/UpdateStripeInfoParam.md b/docs/integration/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/integration/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/integration/UpdateTaxRateParam.md b/docs/integration/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/integration/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/integration/UpdateTenantIdentityProviderParam.md b/docs/integration/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/integration/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/integration/UpdateTenantUserParam.md b/docs/integration/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/integration/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/integration/User.md b/docs/integration/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/integration/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/integration/UserAttributeApi.md b/docs/integration/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/integration/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/integration/UserAttributes.md b/docs/integration/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/integration/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/integration/UserAvailableEnv.md b/docs/integration/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/integration/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/integration/UserAvailableTenant.md b/docs/integration/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/integration/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/integration/UserInfo.md b/docs/integration/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/integration/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/integration/UserInfoApi.md b/docs/integration/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/integration/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/integration/Users.md b/docs/integration/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/integration/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/integration/ValidateInvitationParam.md b/docs/integration/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/integration/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/integration/VerifyRegistrationTokenParam.md b/docs/integration/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/integration/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/integration/VisibilityStatus.md b/docs/integration/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/integration/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/integration/Votes.md b/docs/integration/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/integration/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/pricing/AccountVerification.md b/docs/pricing/AccountVerification.md new file mode 100644 index 0000000..95493a2 --- /dev/null +++ b/docs/pricing/AccountVerification.md @@ -0,0 +1,30 @@ +# AccountVerification + +Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verification_method** | **str** | code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. | +**sending_to** | **str** | email: e-mail sms: SMS smsOrEmail: email if SMS is not possible | + +## Example + +```python +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountVerification from a JSON string +account_verification_instance = AccountVerification.from_json(json) +# print the JSON string representation of the object +print AccountVerification.to_json() + +# convert the object into a dict +account_verification_dict = account_verification_instance.to_dict() +# create an instance of AccountVerification from a dict +account_verification_form_dict = account_verification.from_dict(account_verification_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/pricing/AggregateUsage.md b/docs/pricing/AggregateUsage.md new file mode 100644 index 0000000..f07d398 --- /dev/null +++ b/docs/pricing/AggregateUsage.md @@ -0,0 +1,11 @@ +# AggregateUsage + +Aggregate usage sum: Total usage during the period max: Maximum usage during the period + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/ApiKeys.md b/docs/pricing/ApiKeys.md new file mode 100644 index 0000000..ca3241d --- /dev/null +++ b/docs/pricing/ApiKeys.md @@ -0,0 +1,28 @@ +# ApiKeys + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | **List[str]** | API Key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeys from a JSON string +api_keys_instance = ApiKeys.from_json(json) +# print the JSON string representation of the object +print ApiKeys.to_json() + +# convert the object into a dict +api_keys_dict = api_keys_instance.to_dict() +# create an instance of ApiKeys from a dict +api_keys_form_dict = api_keys.from_dict(api_keys_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/pricing/ApiLog.md b/docs/pricing/ApiLog.md new file mode 100644 index 0000000..300861e --- /dev/null +++ b/docs/pricing/ApiLog.md @@ -0,0 +1,41 @@ +# ApiLog + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trace_id** | **str** | Trace ID | +**api_log_id** | **str** | | +**created_at** | **int** | Epoch second of API log registration timestamp | +**created_date** | **str** | API log registration date | +**ttl** | **int** | Epoch second of planned API log deletion | +**request_method** | **str** | Request method | +**saas_id** | **str** | | +**api_key** | **str** | API Key | +**response_status** | **str** | Response status | +**request_uri** | **str** | Request URI | +**remote_address** | **str** | Client IP Address | +**referer** | **str** | The referrer of the request | +**request_body** | **str** | The body of the request | +**response_body** | **str** | The body of the response | + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_log import ApiLog + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLog from a JSON string +api_log_instance = ApiLog.from_json(json) +# print the JSON string representation of the object +print ApiLog.to_json() + +# convert the object into a dict +api_log_dict = api_log_instance.to_dict() +# create an instance of ApiLog from a dict +api_log_form_dict = api_log.from_dict(api_log_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/pricing/ApiLogApi.md b/docs/pricing/ApiLogApi.md new file mode 100644 index 0000000..16fa3c6 --- /dev/null +++ b/docs/pricing/ApiLogApi.md @@ -0,0 +1,172 @@ +# saasus_sdk_python.src.apilog.ApiLogApi + +All URIs are relative to *https://api.saasus.io/v1/apilog* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_log**](ApiLogApi.md#get_log) | **GET** /logs/{api_log_id} | Get API execution log +[**get_logs**](ApiLogApi.md#get_logs) | **GET** /logs | Get API execution log list + + +# **get_log** +> ApiLog get_log(api_log_id) + +Get API execution log + +Retrieve the log of the API execution with the specified ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + api_log_id = 'api_log_id_example' # str | API Log ID + + try: + # Get API execution log + api_response = api_instance.get_log(api_log_id) + print("The response of ApiLogApi->get_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_log: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_log_id** | **str**| API Log ID | + +### Return type + +[**ApiLog**](ApiLog.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_logs** +> ApiLogs get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + +Get API execution log list + +Retrieve the log of all API executions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.apilog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/apilog +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.apilog.Configuration( + host = "https://api.saasus.io/v1/apilog" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.apilog.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.apilog.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.apilog.ApiLogApi(api_client) + created_date = '2013-10-20' # date | The date, in format of YYYY-MM-DD, to retrieve the log. (optional) + created_at = '2013-10-20T19:20:30+01:00' # datetime | The datetime, in ISO 8601 format, to retrieve the log. (optional) + limit = 56 # int | Maximum number of logs to retrieve. (optional) + cursor = 'cursor_example' # str | Cursor for cursor pagination. (optional) + + try: + # Get API execution log list + api_response = api_instance.get_logs(created_date=created_date, created_at=created_at, limit=limit, cursor=cursor) + print("The response of ApiLogApi->get_logs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ApiLogApi->get_logs: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **created_date** | **date**| The date, in format of YYYY-MM-DD, to retrieve the log. | [optional] + **created_at** | **datetime**| The datetime, in ISO 8601 format, to retrieve the log. | [optional] + **limit** | **int**| Maximum number of logs to retrieve. | [optional] + **cursor** | **str**| Cursor for cursor pagination. | [optional] + +### Return type + +[**ApiLogs**](ApiLogs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/ApiLogs.md b/docs/pricing/ApiLogs.md new file mode 100644 index 0000000..eb7e9c7 --- /dev/null +++ b/docs/pricing/ApiLogs.md @@ -0,0 +1,29 @@ +# ApiLogs + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_logs** | [**List[ApiLog]**](ApiLog.md) | | +**cursor** | **str** | Cursor for cursor pagination | [optional] + +## Example + +```python +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiLogs from a JSON string +api_logs_instance = ApiLogs.from_json(json) +# print the JSON string representation of the object +print ApiLogs.to_json() + +# convert the object into a dict +api_logs_dict = api_logs_instance.to_dict() +# create an instance of ApiLogs from a dict +api_logs_form_dict = api_logs.from_dict(api_logs_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/pricing/Attribute.md b/docs/pricing/Attribute.md new file mode 100644 index 0000000..620a29e --- /dev/null +++ b/docs/pricing/Attribute.md @@ -0,0 +1,30 @@ +# Attribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_name** | **str** | Attribute Name | +**display_name** | **str** | Display Name | +**attribute_type** | [**AttributeType**](AttributeType.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.attribute import Attribute + +# TODO update the JSON string below +json = "{}" +# create an instance of Attribute from a JSON string +attribute_instance = Attribute.from_json(json) +# print the JSON string representation of the object +print Attribute.to_json() + +# convert the object into a dict +attribute_dict = attribute_instance.to_dict() +# create an instance of Attribute from a dict +attribute_form_dict = attribute.from_dict(attribute_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/pricing/AttributeType.md b/docs/pricing/AttributeType.md new file mode 100644 index 0000000..7c8f83e --- /dev/null +++ b/docs/pricing/AttributeType.md @@ -0,0 +1,11 @@ +# AttributeType + +Type (date can be set to YYYY-MM-DD format.) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/AuthInfo.md b/docs/pricing/AuthInfo.md new file mode 100644 index 0000000..1f6cf51 --- /dev/null +++ b/docs/pricing/AuthInfo.md @@ -0,0 +1,28 @@ +# AuthInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **str** | Redirect After Authentication | + +## Example + +```python +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthInfo from a JSON string +auth_info_instance = AuthInfo.from_json(json) +# print the JSON string representation of the object +print AuthInfo.to_json() + +# convert the object into a dict +auth_info_dict = auth_info_instance.to_dict() +# create an instance of AuthInfo from a dict +auth_info_form_dict = auth_info.from_dict(auth_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/pricing/AuthInfoApi.md b/docs/pricing/AuthInfoApi.md new file mode 100644 index 0000000..de059f3 --- /dev/null +++ b/docs/pricing/AuthInfoApi.md @@ -0,0 +1,464 @@ +# saasus_sdk_python.src.auth.AuthInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_auth_info**](AuthInfoApi.md#get_auth_info) | **GET** /auth-info | Get Authentication Info +[**get_identity_providers**](AuthInfoApi.md#get_identity_providers) | **GET** /identity-providers | Get Sign-In Information Via External Provider +[**get_sign_in_settings**](AuthInfoApi.md#get_sign_in_settings) | **GET** /sign-in-settings | Get Password Requirements +[**update_auth_info**](AuthInfoApi.md#update_auth_info) | **PUT** /auth-info | Update Authentication Info +[**update_identity_provider**](AuthInfoApi.md#update_identity_provider) | **PUT** /identity-providers | Update Sign-In Information +[**update_sign_in_settings**](AuthInfoApi.md#update_sign_in_settings) | **PUT** /sign-in-settings | Update Password Requirements + + +# **get_auth_info** +> AuthInfo get_auth_info() + +Get Authentication Info + +Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Authentication Info + api_response = api_instance.get_auth_info() + print("The response of AuthInfoApi->get_auth_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_auth_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthInfo**](AuthInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_identity_providers** +> IdentityProviders get_identity_providers() + +Get Sign-In Information Via External Provider + +Get sign-in information via external provider set in cognito. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Sign-In Information Via External Provider + api_response = api_instance.get_identity_providers() + print("The response of AuthInfoApi->get_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_identity_providers: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityProviders**](IdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_sign_in_settings** +> SignInSettings get_sign_in_settings() + +Get Password Requirements + +Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + + try: + # Get Password Requirements + api_response = api_instance.get_sign_in_settings() + print("The response of AuthInfoApi->get_sign_in_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthInfoApi->get_sign_in_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SignInSettings**](SignInSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_auth_info** +> update_auth_info(body=body) + +Update Authentication Info + +Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + body = saasus_sdk_python.src.auth.AuthInfo() # AuthInfo | (optional) + + try: + # Update Authentication Info + api_instance.update_auth_info(body=body) + except Exception as e: + print("Exception when calling AuthInfoApi->update_auth_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AuthInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_identity_provider** +> update_identity_provider(update_identity_provider_param=update_identity_provider_param) + +Update Sign-In Information + +Update the sign-in information for the external ID provider + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_identity_provider_param = saasus_sdk_python.src.auth.UpdateIdentityProviderParam() # UpdateIdentityProviderParam | (optional) + + try: + # Update Sign-In Information + api_instance.update_identity_provider(update_identity_provider_param=update_identity_provider_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_identity_provider_param** | [**UpdateIdentityProviderParam**](UpdateIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_sign_in_settings** +> update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + +Update Password Requirements + +Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.AuthInfoApi(api_client) + update_sign_in_settings_param = saasus_sdk_python.src.auth.UpdateSignInSettingsParam() # UpdateSignInSettingsParam | (optional) + + try: + # Update Password Requirements + api_instance.update_sign_in_settings(update_sign_in_settings_param=update_sign_in_settings_param) + except Exception as e: + print("Exception when calling AuthInfoApi->update_sign_in_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sign_in_settings_param** | [**UpdateSignInSettingsParam**](UpdateSignInSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/AuthorizationTempCode.md b/docs/pricing/AuthorizationTempCode.md new file mode 100644 index 0000000..f8e22a2 --- /dev/null +++ b/docs/pricing/AuthorizationTempCode.md @@ -0,0 +1,28 @@ +# AuthorizationTempCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthorizationTempCode from a JSON string +authorization_temp_code_instance = AuthorizationTempCode.from_json(json) +# print the JSON string representation of the object +print AuthorizationTempCode.to_json() + +# convert the object into a dict +authorization_temp_code_dict = authorization_temp_code_instance.to_dict() +# create an instance of AuthorizationTempCode from a dict +authorization_temp_code_form_dict = authorization_temp_code.from_dict(authorization_temp_code_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/pricing/AwsMarketplaceApi.md b/docs/pricing/AwsMarketplaceApi.md new file mode 100644 index 0000000..209d914 --- /dev/null +++ b/docs/pricing/AwsMarketplaceApi.md @@ -0,0 +1,1085 @@ +# saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi + +All URIs are relative to *https://api.saasus.io/v1/awsmarketplace* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_customer**](AwsMarketplaceApi.md#create_customer) | **POST** /customers | Create customer information to be linked to AWS Marketplace +[**get_catalog_entity_visibility**](AwsMarketplaceApi.md#get_catalog_entity_visibility) | **GET** /catalog-entity/visibility | Obtain product publication status from AWS Marketplace +[**get_cloud_formation_launch_stack_link**](AwsMarketplaceApi.md#get_cloud_formation_launch_stack_link) | **GET** /cloudformation-launch-stack-link | Get the link to create the AWS CloudFormation stack +[**get_customer**](AwsMarketplaceApi.md#get_customer) | **GET** /customers/{customer_identifier} | Get customer information to be linked to AWS Marketplace +[**get_customers**](AwsMarketplaceApi.md#get_customers) | **GET** /customers | Get a list of customer information to be linked to AWS Marketplace +[**get_listing_status**](AwsMarketplaceApi.md#get_listing_status) | **GET** /listing-status | Get AWS Marketplace Listing Status +[**get_plan_by_plan_name**](AwsMarketplaceApi.md#get_plan_by_plan_name) | **GET** /plans/{plan_name} | Obtain plan information to link to AWS Marketplace +[**get_plans**](AwsMarketplaceApi.md#get_plans) | **GET** /plans | Obtain plan information to link to AWS Marketplace +[**get_settings**](AwsMarketplaceApi.md#get_settings) | **GET** /settings | Get AWS Marketplace Settings +[**save_plan**](AwsMarketplaceApi.md#save_plan) | **PUT** /plans | Save plan information to be linked to AWSMarketplace +[**sync_customer**](AwsMarketplaceApi.md#sync_customer) | **POST** /customers/{customer_identifier}/sync | Sync AWS Marketplace customer information to SaaSus +[**update_listing_status**](AwsMarketplaceApi.md#update_listing_status) | **PUT** /listing-status | Update AWS Marketplace Listing Status +[**update_settings**](AwsMarketplaceApi.md#update_settings) | **PUT** /settings | Update AWS Marketplace Settings +[**verify_registration_token**](AwsMarketplaceApi.md#verify_registration_token) | **POST** /registration-token/verify | Verify Registration Token + + +# **create_customer** +> Customer create_customer(create_customer_param=create_customer_param) + +Create customer information to be linked to AWS Marketplace + +Create customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + create_customer_param = saasus_sdk_python.src.awsmarketplace.CreateCustomerParam() # CreateCustomerParam | (optional) + + try: + # Create customer information to be linked to AWS Marketplace + api_response = api_instance.create_customer(create_customer_param=create_customer_param) + print("The response of AwsMarketplaceApi->create_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->create_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_customer_param** | [**CreateCustomerParam**](CreateCustomerParam.md)| | [optional] + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_catalog_entity_visibility** +> CatalogEntityVisibility get_catalog_entity_visibility() + +Obtain product publication status from AWS Marketplace + +Retrieve the product's publication status from AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain product publication status from AWS Marketplace + api_response = api_instance.get_catalog_entity_visibility() + print("The response of AwsMarketplaceApi->get_catalog_entity_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_catalog_entity_visibility: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CatalogEntityVisibility**](CatalogEntityVisibility.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_cloud_formation_launch_stack_link** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link() + +Get the link to create the AWS CloudFormation stack + +Get the CloudFormation Quick Create link. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get the link to create the AWS CloudFormation stack + api_response = api_instance.get_cloud_formation_launch_stack_link() + print("The response of AwsMarketplaceApi->get_cloud_formation_launch_stack_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_cloud_formation_launch_stack_link: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customer** +> Customer get_customer(customer_identifier) + +Get customer information to be linked to AWS Marketplace + +Get customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Get customer information to be linked to AWS Marketplace + api_response = api_instance.get_customer(customer_identifier) + print("The response of AwsMarketplaceApi->get_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +[**Customer**](Customer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customers** +> Customers get_customers(tenant_ids=tenant_ids) + +Get a list of customer information to be linked to AWS Marketplace + +Get a list of customer information to be linked to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + tenant_ids = ['tenant_ids_example'] # List[str] | 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) (optional) + + try: + # Get a list of customer information to be linked to AWS Marketplace + api_response = api_instance.get_customers(tenant_ids=tenant_ids) + print("The response of AwsMarketplaceApi->get_customers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_customers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_ids** | [**List[str]**](str.md)| 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) | [optional] + +### Return type + +[**Customers**](Customers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_listing_status** +> GetListingStatusResult get_listing_status() + +Get AWS Marketplace Listing Status + +Get AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Listing Status + api_response = api_instance.get_listing_status() + print("The response of AwsMarketplaceApi->get_listing_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_listing_status: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetListingStatusResult**](GetListingStatusResult.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plan_by_plan_name** +> Plan get_plan_by_plan_name(plan_name) + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + plan_name = 'normal_plan_name_month' # str | AWS Marketplace linked plan name + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plan_by_plan_name(plan_name) + print("The response of AwsMarketplaceApi->get_plan_by_plan_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plan_by_plan_name: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_name** | **str**| AWS Marketplace linked plan name | + +### Return type + +[**Plan**](Plan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_plans** +> Plans get_plans() + +Obtain plan information to link to AWS Marketplace + +Obtain plan information to link to AWS Marketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Obtain plan information to link to AWS Marketplace + api_response = api_instance.get_plans() + print("The response of AwsMarketplaceApi->get_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Plans**](Plans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_settings** +> Settings get_settings() + +Get AWS Marketplace Settings + +Get AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + + try: + # Get AWS Marketplace Settings + api_response = api_instance.get_settings() + print("The response of AwsMarketplaceApi->get_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->get_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Settings**](Settings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_plan** +> save_plan(save_plan_param=save_plan_param) + +Save plan information to be linked to AWSMarketplace + +Save plan information to be linked to AWSMarketplace. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + save_plan_param = saasus_sdk_python.src.awsmarketplace.SavePlanParam() # SavePlanParam | (optional) + + try: + # Save plan information to be linked to AWSMarketplace + api_instance.save_plan(save_plan_param=save_plan_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->save_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **save_plan_param** | [**SavePlanParam**](SavePlanParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sync_customer** +> sync_customer(customer_identifier) + +Sync AWS Marketplace customer information to SaaSus + +Sync AWS Marketplace customer information to SaaSus. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + customer_identifier = '123456789012' # str | Customer ID + + try: + # Sync AWS Marketplace customer information to SaaSus + api_instance.sync_customer(customer_identifier) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->sync_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customer_identifier** | **str**| Customer ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_listing_status** +> update_listing_status(update_listing_status_param=update_listing_status_param) + +Update AWS Marketplace Listing Status + +Update AWS Marketplace Listing Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_listing_status_param = saasus_sdk_python.src.awsmarketplace.UpdateListingStatusParam() # UpdateListingStatusParam | (optional) + + try: + # Update AWS Marketplace Listing Status + api_instance.update_listing_status(update_listing_status_param=update_listing_status_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_listing_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_listing_status_param** | [**UpdateListingStatusParam**](UpdateListingStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_settings** +> update_settings(update_settings_param=update_settings_param) + +Update AWS Marketplace Settings + +Update AWS Marketplace Settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + update_settings_param = saasus_sdk_python.src.awsmarketplace.UpdateSettingsParam() # UpdateSettingsParam | (optional) + + try: + # Update AWS Marketplace Settings + api_instance.update_settings(update_settings_param=update_settings_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->update_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_settings_param** | [**UpdateSettingsParam**](UpdateSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **verify_registration_token** +> verify_registration_token(verify_registration_token_param=verify_registration_token_param) + +Verify Registration Token + +Verify Registration Token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.awsmarketplace +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/awsmarketplace +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + host = "https://api.saasus.io/v1/awsmarketplace" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.awsmarketplace.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.awsmarketplace.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.awsmarketplace.AwsMarketplaceApi(api_client) + verify_registration_token_param = saasus_sdk_python.src.awsmarketplace.VerifyRegistrationTokenParam() # VerifyRegistrationTokenParam | (optional) + + try: + # Verify Registration Token + api_instance.verify_registration_token(verify_registration_token_param=verify_registration_token_param) + except Exception as e: + print("Exception when calling AwsMarketplaceApi->verify_registration_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_registration_token_param** | [**VerifyRegistrationTokenParam**](VerifyRegistrationTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/pricing/AwsRegion.md b/docs/pricing/AwsRegion.md new file mode 100644 index 0000000..fadbffc --- /dev/null +++ b/docs/pricing/AwsRegion.md @@ -0,0 +1,11 @@ +# AwsRegion + +All AWS regions except Ningxia and Beijing in China can be selected. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/BasicInfo.md b/docs/pricing/BasicInfo.md new file mode 100644 index 0000000..24e875f --- /dev/null +++ b/docs/pricing/BasicInfo.md @@ -0,0 +1,36 @@ +# BasicInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**is_dns_validated** | **bool** | DNS Record Verification Results | +**certificate_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**cloud_front_dns_record** | [**DnsRecord**](DnsRecord.md) | | +**dkim_dns_records** | [**List[DnsRecord]**](DnsRecord.md) | DKIM DNS Records | +**default_domain_name** | **str** | Default Domain Name | +**from_email_address** | **str** | Sender Email for Authentication Email | +**reply_email_address** | **str** | Reply-from email address of authentication email | +**is_ses_sandbox_granted** | **bool** | SES sandbox release and Cognito SES configuration results | + +## Example + +```python +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BasicInfo from a JSON string +basic_info_instance = BasicInfo.from_json(json) +# print the JSON string representation of the object +print BasicInfo.to_json() + +# convert the object into a dict +basic_info_dict = basic_info_instance.to_dict() +# create an instance of BasicInfo from a dict +basic_info_form_dict = basic_info.from_dict(basic_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/pricing/BasicInfoApi.md b/docs/pricing/BasicInfoApi.md new file mode 100644 index 0000000..eb2199b --- /dev/null +++ b/docs/pricing/BasicInfoApi.md @@ -0,0 +1,616 @@ +# saasus_sdk_python.src.auth.BasicInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**find_notification_messages**](BasicInfoApi.md#find_notification_messages) | **GET** /notification-messages | Get Notification Email Templates +[**get_basic_info**](BasicInfoApi.md#get_basic_info) | **GET** /basic-info | Get Basic Configurations +[**get_customize_page_settings**](BasicInfoApi.md#get_customize_page_settings) | **GET** /customize-page-settings | Get Authentication Authorization Basic Information +[**get_customize_pages**](BasicInfoApi.md#get_customize_pages) | **GET** /customize-pages | Get Authentication Page Setting +[**update_basic_info**](BasicInfoApi.md#update_basic_info) | **PUT** /basic-info | Update Basic Configurations +[**update_customize_page_settings**](BasicInfoApi.md#update_customize_page_settings) | **PATCH** /customize-page-settings | Update Authentication Authorization Basic Information +[**update_customize_pages**](BasicInfoApi.md#update_customize_pages) | **PATCH** /customize-pages | Authentication Page Setting +[**update_notification_messages**](BasicInfoApi.md#update_notification_messages) | **PUT** /notification-messages | Update Notification Email Template + + +# **find_notification_messages** +> NotificationMessages find_notification_messages() + +Get Notification Email Templates + +Get notification email templates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Notification Email Templates + api_response = api_instance.find_notification_messages() + print("The response of BasicInfoApi->find_notification_messages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->find_notification_messages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessages**](NotificationMessages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_basic_info** +> BasicInfo get_basic_info() + +Get Basic Configurations + +Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Basic Configurations + api_response = api_instance.get_basic_info() + print("The response of BasicInfoApi->get_basic_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_basic_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BasicInfo**](BasicInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_page_settings** +> CustomizePageSettings get_customize_page_settings() + +Get Authentication Authorization Basic Information + +Get authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Authorization Basic Information + api_response = api_instance.get_customize_page_settings() + print("The response of BasicInfoApi->get_customize_page_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_page_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePageSettings**](CustomizePageSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_customize_pages** +> CustomizePages get_customize_pages() + +Get Authentication Page Setting + +Get the authentication screen setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + + try: + # Get Authentication Page Setting + api_response = api_instance.get_customize_pages() + print("The response of BasicInfoApi->get_customize_pages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BasicInfoApi->get_customize_pages: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CustomizePages**](CustomizePages.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_basic_info** +> update_basic_info(update_basic_info_param=update_basic_info_param) + +Update Basic Configurations + +Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_basic_info_param = saasus_sdk_python.src.auth.UpdateBasicInfoParam() # UpdateBasicInfoParam | (optional) + + try: + # Update Basic Configurations + api_instance.update_basic_info(update_basic_info_param=update_basic_info_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_basic_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_basic_info_param** | [**UpdateBasicInfoParam**](UpdateBasicInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_page_settings** +> update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + +Update Authentication Authorization Basic Information + +Update authentication authorization basic information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_page_settings_param = saasus_sdk_python.src.auth.UpdateCustomizePageSettingsParam() # UpdateCustomizePageSettingsParam | (optional) + + try: + # Update Authentication Authorization Basic Information + api_instance.update_customize_page_settings(update_customize_page_settings_param=update_customize_page_settings_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_page_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_page_settings_param** | [**UpdateCustomizePageSettingsParam**](UpdateCustomizePageSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_customize_pages** +> update_customize_pages(update_customize_pages_param=update_customize_pages_param) + +Authentication Page Setting + +Update the authentication page setting information (new registration, login, password reset, etc.). + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_customize_pages_param = saasus_sdk_python.src.auth.UpdateCustomizePagesParam() # UpdateCustomizePagesParam | (optional) + + try: + # Authentication Page Setting + api_instance.update_customize_pages(update_customize_pages_param=update_customize_pages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_customize_pages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_customize_pages_param** | [**UpdateCustomizePagesParam**](UpdateCustomizePagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_notification_messages** +> update_notification_messages(update_notification_messages_param=update_notification_messages_param) + +Update Notification Email Template + +Update notification email template. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.BasicInfoApi(api_client) + update_notification_messages_param = saasus_sdk_python.src.auth.UpdateNotificationMessagesParam() # UpdateNotificationMessagesParam | (optional) + + try: + # Update Notification Email Template + api_instance.update_notification_messages(update_notification_messages_param=update_notification_messages_param) + except Exception as e: + print("Exception when calling BasicInfoApi->update_notification_messages: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_notification_messages_param** | [**UpdateNotificationMessagesParam**](UpdateNotificationMessagesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/BillingAddress.md b/docs/pricing/BillingAddress.md new file mode 100644 index 0000000..76df7fc --- /dev/null +++ b/docs/pricing/BillingAddress.md @@ -0,0 +1,33 @@ +# BillingAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **str** | Street address, apartment or suite number. | +**city** | **str** | City, district, suburb, town, or village. | +**state** | **str** | State name or abbreviation. | +**country** | **str** | Country of the address using ISO 3166-1 alpha-2 code. | +**additional_address_info** | **str** | Additional information about the address, such as a building name, floor, or department name. | [optional] +**postal_code** | **str** | ZIP or postal code. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingAddress from a JSON string +billing_address_instance = BillingAddress.from_json(json) +# print the JSON string representation of the object +print BillingAddress.to_json() + +# convert the object into a dict +billing_address_dict = billing_address_instance.to_dict() +# create an instance of BillingAddress from a dict +billing_address_form_dict = billing_address.from_dict(billing_address_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/pricing/BillingInfo.md b/docs/pricing/BillingInfo.md new file mode 100644 index 0000000..678a152 --- /dev/null +++ b/docs/pricing/BillingInfo.md @@ -0,0 +1,30 @@ +# BillingInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Tenant name for billing | +**address** | [**BillingAddress**](BillingAddress.md) | | +**invoice_language** | [**InvoiceLanguage**](InvoiceLanguage.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingInfo from a JSON string +billing_info_instance = BillingInfo.from_json(json) +# print the JSON string representation of the object +print BillingInfo.to_json() + +# convert the object into a dict +billing_info_dict = billing_info_instance.to_dict() +# create an instance of BillingInfo from a dict +billing_info_form_dict = billing_info.from_dict(billing_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/pricing/CatalogEntityVisibility.md b/docs/pricing/CatalogEntityVisibility.md new file mode 100644 index 0000000..6b91350 --- /dev/null +++ b/docs/pricing/CatalogEntityVisibility.md @@ -0,0 +1,28 @@ +# CatalogEntityVisibility + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityStatus**](VisibilityStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility + +# TODO update the JSON string below +json = "{}" +# create an instance of CatalogEntityVisibility from a JSON string +catalog_entity_visibility_instance = CatalogEntityVisibility.from_json(json) +# print the JSON string representation of the object +print CatalogEntityVisibility.to_json() + +# convert the object into a dict +catalog_entity_visibility_dict = catalog_entity_visibility_instance.to_dict() +# create an instance of CatalogEntityVisibility from a dict +catalog_entity_visibility_form_dict = catalog_entity_visibility.from_dict(catalog_entity_visibility_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/pricing/ClientSecret.md b/docs/pricing/ClientSecret.md new file mode 100644 index 0000000..22cd22f --- /dev/null +++ b/docs/pricing/ClientSecret.md @@ -0,0 +1,28 @@ +# ClientSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | Client Secret | + +## Example + +```python +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientSecret from a JSON string +client_secret_instance = ClientSecret.from_json(json) +# print the JSON string representation of the object +print ClientSecret.to_json() + +# convert the object into a dict +client_secret_dict = client_secret_instance.to_dict() +# create an instance of ClientSecret from a dict +client_secret_form_dict = client_secret.from_dict(client_secret_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/pricing/CloudFormationLaunchStackLink.md b/docs/pricing/CloudFormationLaunchStackLink.md new file mode 100644 index 0000000..2d9f76c --- /dev/null +++ b/docs/pricing/CloudFormationLaunchStackLink.md @@ -0,0 +1,28 @@ +# CloudFormationLaunchStackLink + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudFormationLaunchStackLink from a JSON string +cloud_formation_launch_stack_link_instance = CloudFormationLaunchStackLink.from_json(json) +# print the JSON string representation of the object +print CloudFormationLaunchStackLink.to_json() + +# convert the object into a dict +cloud_formation_launch_stack_link_dict = cloud_formation_launch_stack_link_instance.to_dict() +# create an instance of CloudFormationLaunchStackLink from a dict +cloud_formation_launch_stack_link_form_dict = cloud_formation_launch_stack_link.from_dict(cloud_formation_launch_stack_link_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/pricing/Comment.md b/docs/pricing/Comment.md new file mode 100644 index 0000000..7f4be85 --- /dev/null +++ b/docs/pricing/Comment.md @@ -0,0 +1,30 @@ +# Comment + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **int** | | +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comment import Comment + +# TODO update the JSON string below +json = "{}" +# create an instance of Comment from a JSON string +comment_instance = Comment.from_json(json) +# print the JSON string representation of the object +print Comment.to_json() + +# convert the object into a dict +comment_dict = comment_instance.to_dict() +# create an instance of Comment from a dict +comment_form_dict = comment.from_dict(comment_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/pricing/Comments.md b/docs/pricing/Comments.md new file mode 100644 index 0000000..e187bca --- /dev/null +++ b/docs/pricing/Comments.md @@ -0,0 +1,28 @@ +# Comments + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comments** | [**List[Comment]**](Comment.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.comments import Comments + +# TODO update the JSON string below +json = "{}" +# create an instance of Comments from a JSON string +comments_instance = Comments.from_json(json) +# print the JSON string representation of the object +print Comments.to_json() + +# convert the object into a dict +comments_dict = comments_instance.to_dict() +# create an instance of Comments from a dict +comments_form_dict = comments.from_dict(comments_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/pricing/ConfirmEmailUpdateParam.md b/docs/pricing/ConfirmEmailUpdateParam.md new file mode 100644 index 0000000..e556ff9 --- /dev/null +++ b/docs/pricing/ConfirmEmailUpdateParam.md @@ -0,0 +1,29 @@ +# ConfirmEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmEmailUpdateParam from a JSON string +confirm_email_update_param_instance = ConfirmEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print ConfirmEmailUpdateParam.to_json() + +# convert the object into a dict +confirm_email_update_param_dict = confirm_email_update_param_instance.to_dict() +# create an instance of ConfirmEmailUpdateParam from a dict +confirm_email_update_param_form_dict = confirm_email_update_param.from_dict(confirm_email_update_param_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/pricing/ConfirmExternalUserLinkParam.md b/docs/pricing/ConfirmExternalUserLinkParam.md new file mode 100644 index 0000000..c95d388 --- /dev/null +++ b/docs/pricing/ConfirmExternalUserLinkParam.md @@ -0,0 +1,29 @@ +# ConfirmExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**code** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmExternalUserLinkParam from a JSON string +confirm_external_user_link_param_instance = ConfirmExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print ConfirmExternalUserLinkParam.to_json() + +# convert the object into a dict +confirm_external_user_link_param_dict = confirm_external_user_link_param_instance.to_dict() +# create an instance of ConfirmExternalUserLinkParam from a dict +confirm_external_user_link_param_form_dict = confirm_external_user_link_param.from_dict(confirm_external_user_link_param_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/pricing/ConfirmSignUpWithAwsMarketplaceParam.md b/docs/pricing/ConfirmSignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..47dc516 --- /dev/null +++ b/docs/pricing/ConfirmSignUpWithAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# ConfirmSignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_name** | **str** | Tenant name | [optional] +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string +confirm_sign_up_with_aws_marketplace_param_instance = ConfirmSignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print ConfirmSignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +confirm_sign_up_with_aws_marketplace_param_dict = confirm_sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict +confirm_sign_up_with_aws_marketplace_param_form_dict = confirm_sign_up_with_aws_marketplace_param.from_dict(confirm_sign_up_with_aws_marketplace_param_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/pricing/CreateCustomerParam.md b/docs/pricing/CreateCustomerParam.md new file mode 100644 index 0000000..15aae29 --- /dev/null +++ b/docs/pricing/CreateCustomerParam.md @@ -0,0 +1,29 @@ +# CreateCustomerParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomerParam from a JSON string +create_customer_param_instance = CreateCustomerParam.from_json(json) +# print the JSON string representation of the object +print CreateCustomerParam.to_json() + +# convert the object into a dict +create_customer_param_dict = create_customer_param_instance.to_dict() +# create an instance of CreateCustomerParam from a dict +create_customer_param_form_dict = create_customer_param.from_dict(create_customer_param_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/pricing/CreateEventBridgeEventParam.md b/docs/pricing/CreateEventBridgeEventParam.md new file mode 100644 index 0000000..adf068c --- /dev/null +++ b/docs/pricing/CreateEventBridgeEventParam.md @@ -0,0 +1,28 @@ +# CreateEventBridgeEventParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_messages** | [**List[EventMessage]**](EventMessage.md) | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateEventBridgeEventParam from a JSON string +create_event_bridge_event_param_instance = CreateEventBridgeEventParam.from_json(json) +# print the JSON string representation of the object +print CreateEventBridgeEventParam.to_json() + +# convert the object into a dict +create_event_bridge_event_param_dict = create_event_bridge_event_param_instance.to_dict() +# create an instance of CreateEventBridgeEventParam from a dict +create_event_bridge_event_param_form_dict = create_event_bridge_event_param.from_dict(create_event_bridge_event_param_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/pricing/CreateFeedbackCommentParam.md b/docs/pricing/CreateFeedbackCommentParam.md new file mode 100644 index 0000000..821a51f --- /dev/null +++ b/docs/pricing/CreateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# CreateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackCommentParam from a JSON string +create_feedback_comment_param_instance = CreateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackCommentParam.to_json() + +# convert the object into a dict +create_feedback_comment_param_dict = create_feedback_comment_param_instance.to_dict() +# create an instance of CreateFeedbackCommentParam from a dict +create_feedback_comment_param_form_dict = create_feedback_comment_param.from_dict(create_feedback_comment_param_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/pricing/CreateFeedbackParam.md b/docs/pricing/CreateFeedbackParam.md new file mode 100644 index 0000000..0e8fb4a --- /dev/null +++ b/docs/pricing/CreateFeedbackParam.md @@ -0,0 +1,30 @@ +# CreateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFeedbackParam from a JSON string +create_feedback_param_instance = CreateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print CreateFeedbackParam.to_json() + +# convert the object into a dict +create_feedback_param_dict = create_feedback_param_instance.to_dict() +# create an instance of CreateFeedbackParam from a dict +create_feedback_param_form_dict = create_feedback_param.from_dict(create_feedback_param_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/pricing/CreateSaasUserParam.md b/docs/pricing/CreateSaasUserParam.md new file mode 100644 index 0000000..955573d --- /dev/null +++ b/docs/pricing/CreateSaasUserParam.md @@ -0,0 +1,29 @@ +# CreateSaasUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**password** | **str** | Password | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSaasUserParam from a JSON string +create_saas_user_param_instance = CreateSaasUserParam.from_json(json) +# print the JSON string representation of the object +print CreateSaasUserParam.to_json() + +# convert the object into a dict +create_saas_user_param_dict = create_saas_user_param_instance.to_dict() +# create an instance of CreateSaasUserParam from a dict +create_saas_user_param_form_dict = create_saas_user_param.from_dict(create_saas_user_param_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/pricing/CreateSecretCodeParam.md b/docs/pricing/CreateSecretCodeParam.md new file mode 100644 index 0000000..c43c546 --- /dev/null +++ b/docs/pricing/CreateSecretCodeParam.md @@ -0,0 +1,28 @@ +# CreateSecretCodeParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretCodeParam from a JSON string +create_secret_code_param_instance = CreateSecretCodeParam.from_json(json) +# print the JSON string representation of the object +print CreateSecretCodeParam.to_json() + +# convert the object into a dict +create_secret_code_param_dict = create_secret_code_param_instance.to_dict() +# create an instance of CreateSecretCodeParam from a dict +create_secret_code_param_form_dict = create_secret_code_param.from_dict(create_secret_code_param_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/pricing/CreateTenantInvitationParam.md b/docs/pricing/CreateTenantInvitationParam.md new file mode 100644 index 0000000..817e875 --- /dev/null +++ b/docs/pricing/CreateTenantInvitationParam.md @@ -0,0 +1,30 @@ +# CreateTenantInvitationParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the user to be invited | +**access_token** | **str** | Access token of the user who creates an invitation | +**envs** | [**List[InvitedUserEnvironmentInformationInner]**](InvitedUserEnvironmentInformationInner.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantInvitationParam from a JSON string +create_tenant_invitation_param_instance = CreateTenantInvitationParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantInvitationParam.to_json() + +# convert the object into a dict +create_tenant_invitation_param_dict = create_tenant_invitation_param_instance.to_dict() +# create an instance of CreateTenantInvitationParam from a dict +create_tenant_invitation_param_form_dict = create_tenant_invitation_param.from_dict(create_tenant_invitation_param_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/pricing/CreateTenantUserParam.md b/docs/pricing/CreateTenantUserParam.md new file mode 100644 index 0000000..81c2e0a --- /dev/null +++ b/docs/pricing/CreateTenantUserParam.md @@ -0,0 +1,29 @@ +# CreateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserParam from a JSON string +create_tenant_user_param_instance = CreateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserParam.to_json() + +# convert the object into a dict +create_tenant_user_param_dict = create_tenant_user_param_instance.to_dict() +# create an instance of CreateTenantUserParam from a dict +create_tenant_user_param_form_dict = create_tenant_user_param.from_dict(create_tenant_user_param_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/pricing/CreateTenantUserRolesParam.md b/docs/pricing/CreateTenantUserRolesParam.md new file mode 100644 index 0000000..779b640 --- /dev/null +++ b/docs/pricing/CreateTenantUserRolesParam.md @@ -0,0 +1,28 @@ +# CreateTenantUserRolesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_names** | **List[str]** | Role Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTenantUserRolesParam from a JSON string +create_tenant_user_roles_param_instance = CreateTenantUserRolesParam.from_json(json) +# print the JSON string representation of the object +print CreateTenantUserRolesParam.to_json() + +# convert the object into a dict +create_tenant_user_roles_param_dict = create_tenant_user_roles_param_instance.to_dict() +# create an instance of CreateTenantUserRolesParam from a dict +create_tenant_user_roles_param_form_dict = create_tenant_user_roles_param.from_dict(create_tenant_user_roles_param_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/pricing/CreateVoteUserParam.md b/docs/pricing/CreateVoteUserParam.md new file mode 100644 index 0000000..290287c --- /dev/null +++ b/docs/pricing/CreateVoteUserParam.md @@ -0,0 +1,28 @@ +# CreateVoteUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVoteUserParam from a JSON string +create_vote_user_param_instance = CreateVoteUserParam.from_json(json) +# print the JSON string representation of the object +print CreateVoteUserParam.to_json() + +# convert the object into a dict +create_vote_user_param_dict = create_vote_user_param_instance.to_dict() +# create an instance of CreateVoteUserParam from a dict +create_vote_user_param_form_dict = create_vote_user_param.from_dict(create_vote_user_param_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/pricing/CredentialApi.md b/docs/pricing/CredentialApi.md new file mode 100644 index 0000000..82661a9 --- /dev/null +++ b/docs/pricing/CredentialApi.md @@ -0,0 +1,174 @@ +# saasus_sdk_python.src.auth.CredentialApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_credentials**](CredentialApi.md#create_auth_credentials) | **POST** /credentials | Save Authentication/Authorization Information +[**get_auth_credentials**](CredentialApi.md#get_auth_credentials) | **GET** /credentials | Get Authentication/Authorization Information + + +# **create_auth_credentials** +> AuthorizationTempCode create_auth_credentials(body=body) + +Save Authentication/Authorization Information + +Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + body = saasus_sdk_python.src.auth.Credentials() # Credentials | (optional) + + try: + # Save Authentication/Authorization Information + api_response = api_instance.create_auth_credentials(body=body) + print("The response of CredentialApi->create_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->create_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Credentials**| | [optional] + +### Return type + +[**AuthorizationTempCode**](AuthorizationTempCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_auth_credentials** +> Credentials get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + +Get Authentication/Authorization Information + +Get ID token, access token, and refresh token using a temporary code or a refresh token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.CredentialApi(api_client) + code = 'code_example' # str | Temp Code (optional) + auth_flow = 'auth_flow_example' # str | Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth (optional) + refresh_token = 'refresh_token_example' # str | Refresh Token (optional) + + try: + # Get Authentication/Authorization Information + api_response = api_instance.get_auth_credentials(code=code, auth_flow=auth_flow, refresh_token=refresh_token) + print("The response of CredentialApi->get_auth_credentials:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CredentialApi->get_auth_credentials: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Temp Code | [optional] + **auth_flow** | **str**| Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth | [optional] + **refresh_token** | **str**| Refresh Token | [optional] + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/Credentials.md b/docs/pricing/Credentials.md new file mode 100644 index 0000000..9c72225 --- /dev/null +++ b/docs/pricing/Credentials.md @@ -0,0 +1,30 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id_token** | **str** | ID token | +**access_token** | **str** | Access token | +**refresh_token** | **str** | Refresh token | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print Credentials.to_json() + +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_form_dict = credentials.from_dict(credentials_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/pricing/Currency.md b/docs/pricing/Currency.md new file mode 100644 index 0000000..a8adc82 --- /dev/null +++ b/docs/pricing/Currency.md @@ -0,0 +1,11 @@ +# Currency + +Unit of currency + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/Customer.md b/docs/pricing/Customer.md new file mode 100644 index 0000000..baa0b0a --- /dev/null +++ b/docs/pricing/Customer.md @@ -0,0 +1,30 @@ +# Customer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_identifier** | **str** | | +**customer_aws_account_id** | **str** | | +**tenant_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer + +# TODO update the JSON string below +json = "{}" +# create an instance of Customer from a JSON string +customer_instance = Customer.from_json(json) +# print the JSON string representation of the object +print Customer.to_json() + +# convert the object into a dict +customer_dict = customer_instance.to_dict() +# create an instance of Customer from a dict +customer_form_dict = customer.from_dict(customer_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/pricing/Customers.md b/docs/pricing/Customers.md new file mode 100644 index 0000000..dbfc940 --- /dev/null +++ b/docs/pricing/Customers.md @@ -0,0 +1,28 @@ +# Customers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customers** | [**List[Customer]**](Customer.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers + +# TODO update the JSON string below +json = "{}" +# create an instance of Customers from a JSON string +customers_instance = Customers.from_json(json) +# print the JSON string representation of the object +print Customers.to_json() + +# convert the object into a dict +customers_dict = customers_instance.to_dict() +# create an instance of Customers from a dict +customers_form_dict = customers.from_dict(customers_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/pricing/CustomizePageProps.md b/docs/pricing/CustomizePageProps.md new file mode 100644 index 0000000..8382278 --- /dev/null +++ b/docs/pricing/CustomizePageProps.md @@ -0,0 +1,30 @@ +# CustomizePageProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html_contents** | **str** | Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. | +**is_terms_of_service** | **bool** | display the terms of use agreement check box | +**is_privacy_policy** | **bool** | show the privacy policy checkbox | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageProps from a JSON string +customize_page_props_instance = CustomizePageProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageProps.to_json() + +# convert the object into a dict +customize_page_props_dict = customize_page_props_instance.to_dict() +# create an instance of CustomizePageProps from a dict +customize_page_props_form_dict = customize_page_props.from_dict(customize_page_props_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/pricing/CustomizePageSettings.md b/docs/pricing/CustomizePageSettings.md new file mode 100644 index 0000000..115bd82 --- /dev/null +++ b/docs/pricing/CustomizePageSettings.md @@ -0,0 +1,33 @@ +# CustomizePageSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettings from a JSON string +customize_page_settings_instance = CustomizePageSettings.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettings.to_json() + +# convert the object into a dict +customize_page_settings_dict = customize_page_settings_instance.to_dict() +# create an instance of CustomizePageSettings from a dict +customize_page_settings_form_dict = customize_page_settings.from_dict(customize_page_settings_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/pricing/CustomizePageSettingsProps.md b/docs/pricing/CustomizePageSettingsProps.md new file mode 100644 index 0000000..7a353fe --- /dev/null +++ b/docs/pricing/CustomizePageSettingsProps.md @@ -0,0 +1,31 @@ +# CustomizePageSettingsProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePageSettingsProps from a JSON string +customize_page_settings_props_instance = CustomizePageSettingsProps.from_json(json) +# print the JSON string representation of the object +print CustomizePageSettingsProps.to_json() + +# convert the object into a dict +customize_page_settings_props_dict = customize_page_settings_props_instance.to_dict() +# create an instance of CustomizePageSettingsProps from a dict +customize_page_settings_props_form_dict = customize_page_settings_props.from_dict(customize_page_settings_props_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/pricing/CustomizePages.md b/docs/pricing/CustomizePages.md new file mode 100644 index 0000000..d060775 --- /dev/null +++ b/docs/pricing/CustomizePages.md @@ -0,0 +1,30 @@ +# CustomizePages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomizePages from a JSON string +customize_pages_instance = CustomizePages.from_json(json) +# print the JSON string representation of the object +print CustomizePages.to_json() + +# convert the object into a dict +customize_pages_dict = customize_pages_instance.to_dict() +# create an instance of CustomizePages from a dict +customize_pages_form_dict = customize_pages.from_dict(customize_pages_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/pricing/DeviceConfiguration.md b/docs/pricing/DeviceConfiguration.md new file mode 100644 index 0000000..a16863a --- /dev/null +++ b/docs/pricing/DeviceConfiguration.md @@ -0,0 +1,29 @@ +# DeviceConfiguration + +Settings for remembering trusted devices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_remembering** | **str** | always: always remember userOptIn: user opt-in no: don't save | + +## Example + +```python +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceConfiguration from a JSON string +device_configuration_instance = DeviceConfiguration.from_json(json) +# print the JSON string representation of the object +print DeviceConfiguration.to_json() + +# convert the object into a dict +device_configuration_dict = device_configuration_instance.to_dict() +# create an instance of DeviceConfiguration from a dict +device_configuration_form_dict = device_configuration.from_dict(device_configuration_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/pricing/DnsRecord.md b/docs/pricing/DnsRecord.md new file mode 100644 index 0000000..6d58d4d --- /dev/null +++ b/docs/pricing/DnsRecord.md @@ -0,0 +1,30 @@ +# DnsRecord + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | CNAME Resource Record | +**name** | **str** | Record Name | +**value** | **str** | Value | + +## Example + +```python +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsRecord from a JSON string +dns_record_instance = DnsRecord.from_json(json) +# print the JSON string representation of the object +print DnsRecord.to_json() + +# convert the object into a dict +dns_record_dict = dns_record_instance.to_dict() +# create an instance of DnsRecord from a dict +dns_record_form_dict = dns_record.from_dict(dns_record_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/pricing/Env.md b/docs/pricing/Env.md new file mode 100644 index 0000000..4fb40cb --- /dev/null +++ b/docs/pricing/Env.md @@ -0,0 +1,31 @@ +# Env + +env info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.env import Env + +# TODO update the JSON string below +json = "{}" +# create an instance of Env from a JSON string +env_instance = Env.from_json(json) +# print the JSON string representation of the object +print Env.to_json() + +# convert the object into a dict +env_dict = env_instance.to_dict() +# create an instance of Env from a dict +env_form_dict = env.from_dict(env_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/pricing/EnvApi.md b/docs/pricing/EnvApi.md new file mode 100644 index 0000000..627220e --- /dev/null +++ b/docs/pricing/EnvApi.md @@ -0,0 +1,399 @@ +# saasus_sdk_python.src.auth.EnvApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_env**](EnvApi.md#create_env) | **POST** /envs | Create Env Info +[**delete_env**](EnvApi.md#delete_env) | **DELETE** /envs/{env_id} | Delete Env Info +[**get_env**](EnvApi.md#get_env) | **GET** /envs/{env_id} | Get Env Details +[**get_envs**](EnvApi.md#get_envs) | **GET** /envs | Get Env Info +[**update_env**](EnvApi.md#update_env) | **PATCH** /envs/{env_id} | Update Env Info + + +# **create_env** +> Env create_env(body=body) + +Create Env Info + +Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + body = saasus_sdk_python.src.auth.Env() # Env | (optional) + + try: + # Create Env Info + api_response = api_instance.create_env(body=body) + print("The response of EnvApi->create_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->create_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Env**| | [optional] + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_env** +> delete_env(env_id) + +Delete Env Info + +Delete env info. Env with id 3 cannot be deleted. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Delete Env Info + api_instance.delete_env(env_id) + except Exception as e: + print("Exception when calling EnvApi->delete_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_env** +> Env get_env(env_id) + +Get Env Details + +Get environment details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + + try: + # Get Env Details + api_response = api_instance.get_env(env_id) + print("The response of EnvApi->get_env:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + +### Return type + +[**Env**](Env.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_envs** +> Envs get_envs() + +Get Env Info + +Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + + try: + # Get Env Info + api_response = api_instance.get_envs() + print("The response of EnvApi->get_envs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvApi->get_envs: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Envs**](Envs.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_env** +> update_env(env_id, update_env_param=update_env_param) + +Update Env Info + +Update env info. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.EnvApi(api_client) + env_id = 56 # int | Env ID + update_env_param = saasus_sdk_python.src.auth.UpdateEnvParam() # UpdateEnvParam | (optional) + + try: + # Update Env Info + api_instance.update_env(env_id, update_env_param=update_env_param) + except Exception as e: + print("Exception when calling EnvApi->update_env: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **int**| Env ID | + **update_env_param** | [**UpdateEnvParam**](UpdateEnvParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/Envs.md b/docs/pricing/Envs.md new file mode 100644 index 0000000..7181c09 --- /dev/null +++ b/docs/pricing/Envs.md @@ -0,0 +1,29 @@ +# Envs + +env list + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envs** | [**List[Env]**](Env.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.envs import Envs + +# TODO update the JSON string below +json = "{}" +# create an instance of Envs from a JSON string +envs_instance = Envs.from_json(json) +# print the JSON string representation of the object +print Envs.to_json() + +# convert the object into a dict +envs_dict = envs_instance.to_dict() +# create an instance of Envs from a dict +envs_form_dict = envs.from_dict(envs_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/pricing/Error.md b/docs/pricing/Error.md new file mode 100644 index 0000000..dc41c36 --- /dev/null +++ b/docs/pricing/Error.md @@ -0,0 +1,29 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | permission_denied | +**message** | **str** | Error message | + +## Example + +```python +from saasus_sdk_python.src.communication.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print Error.to_json() + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_form_dict = error.from_dict(error_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/pricing/ErrorApi.md b/docs/pricing/ErrorApi.md new file mode 100644 index 0000000..1a81dde --- /dev/null +++ b/docs/pricing/ErrorApi.md @@ -0,0 +1,79 @@ +# saasus_sdk_python.src.communication.ErrorApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**return_internal_server_error**](ErrorApi.md#return_internal_server_error) | **GET** /errors/internal-server-error | Return Internal Server Error + + +# **return_internal_server_error** +> return_internal_server_error() + +Return Internal Server Error + +This endpoint is used for testing purposes. Returns a server error with status code 500. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.ErrorApi(api_client) + + try: + # Return Internal Server Error + api_instance.return_internal_server_error() + except Exception as e: + print("Exception when calling ErrorApi->return_internal_server_error: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | Internal Server Error | - | + +[[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/pricing/EventBridgeApi.md b/docs/pricing/EventBridgeApi.md new file mode 100644 index 0000000..846db39 --- /dev/null +++ b/docs/pricing/EventBridgeApi.md @@ -0,0 +1,381 @@ +# saasus_sdk_python.src.integration.EventBridgeApi + +All URIs are relative to *https://api.saasus.io/v1/integration* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_event_bridge_event**](EventBridgeApi.md#create_event_bridge_event) | **POST** /eventbridge/event | Send Events +[**create_event_bridge_test_event**](EventBridgeApi.md#create_event_bridge_test_event) | **POST** /eventbridge/test-event | Test EventBridge Connection +[**delete_event_bridge_settings**](EventBridgeApi.md#delete_event_bridge_settings) | **DELETE** /eventbridge/info | Delete EventBridge Settings +[**get_event_bridge_settings**](EventBridgeApi.md#get_event_bridge_settings) | **GET** /eventbridge/info | Get EventBridge Settings +[**save_event_bridge_settings**](EventBridgeApi.md#save_event_bridge_settings) | **PUT** /eventbridge/info | Update EventBridge Settings + + +# **create_event_bridge_event** +> create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + +Send Events + +Send events to Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + create_event_bridge_event_param = saasus_sdk_python.src.integration.CreateEventBridgeEventParam() # CreateEventBridgeEventParam | (optional) + + try: + # Send Events + api_instance.create_event_bridge_event(create_event_bridge_event_param=create_event_bridge_event_param) + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_event: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_event_bridge_event_param** | [**CreateEventBridgeEventParam**](CreateEventBridgeEventParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_event_bridge_test_event** +> create_event_bridge_test_event() + +Test EventBridge Connection + +Send events to test the connection with Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Test EventBridge Connection + api_instance.create_event_bridge_test_event() + except Exception as e: + print("Exception when calling EventBridgeApi->create_event_bridge_test_event: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_event_bridge_settings** +> delete_event_bridge_settings() + +Delete EventBridge Settings + +Delete settings used to provide host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Delete EventBridge Settings + api_instance.delete_event_bridge_settings() + except Exception as e: + print("Exception when calling EventBridgeApi->delete_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_event_bridge_settings** +> EventBridgeSettings get_event_bridge_settings() + +Get EventBridge Settings + +Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + + try: + # Get EventBridge Settings + api_response = api_instance.get_event_bridge_settings() + print("The response of EventBridgeApi->get_event_bridge_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EventBridgeApi->get_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**EventBridgeSettings**](EventBridgeSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **save_event_bridge_settings** +> save_event_bridge_settings(body=body) + +Update EventBridge Settings + +Update configuration used to provide the host state via Amazon EventBridge. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.integration +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/integration +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.integration.Configuration( + host = "https://api.saasus.io/v1/integration" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.integration.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.integration.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.integration.EventBridgeApi(api_client) + body = saasus_sdk_python.src.integration.EventBridgeSettings() # EventBridgeSettings | (optional) + + try: + # Update EventBridge Settings + api_instance.save_event_bridge_settings(body=body) + except Exception as e: + print("Exception when calling EventBridgeApi->save_event_bridge_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **EventBridgeSettings**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/EventBridgeSettings.md b/docs/pricing/EventBridgeSettings.md new file mode 100644 index 0000000..6c02751 --- /dev/null +++ b/docs/pricing/EventBridgeSettings.md @@ -0,0 +1,29 @@ +# EventBridgeSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_account_id** | **str** | AWS Account ID | +**aws_region** | [**AwsRegion**](AwsRegion.md) | | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of EventBridgeSettings from a JSON string +event_bridge_settings_instance = EventBridgeSettings.from_json(json) +# print the JSON string representation of the object +print EventBridgeSettings.to_json() + +# convert the object into a dict +event_bridge_settings_dict = event_bridge_settings_instance.to_dict() +# create an instance of EventBridgeSettings from a dict +event_bridge_settings_form_dict = event_bridge_settings.from_dict(event_bridge_settings_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/pricing/EventMessage.md b/docs/pricing/EventMessage.md new file mode 100644 index 0000000..e6f8d86 --- /dev/null +++ b/docs/pricing/EventMessage.md @@ -0,0 +1,30 @@ +# EventMessage + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **str** | event type | +**event_detail_type** | **str** | detailed event type | +**message** | **str** | event message | + +## Example + +```python +from saasus_sdk_python.src.integration.models.event_message import EventMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of EventMessage from a JSON string +event_message_instance = EventMessage.from_json(json) +# print the JSON string representation of the object +print EventMessage.to_json() + +# convert the object into a dict +event_message_dict = event_message_instance.to_dict() +# create an instance of EventMessage from a dict +event_message_form_dict = event_message.from_dict(event_message_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/pricing/Feedback.md b/docs/pricing/Feedback.md new file mode 100644 index 0000000..4935ace --- /dev/null +++ b/docs/pricing/Feedback.md @@ -0,0 +1,36 @@ +# Feedback + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | +**comments** | [**List[Comment]**](Comment.md) | | +**count** | **int** | | +**users** | [**List[User]**](User.md) | | +**id** | **str** | | +**user_id** | **str** | | +**created_at** | **int** | | +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback import Feedback + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedback from a JSON string +feedback_instance = Feedback.from_json(json) +# print the JSON string representation of the object +print Feedback.to_json() + +# convert the object into a dict +feedback_dict = feedback_instance.to_dict() +# create an instance of Feedback from a dict +feedback_form_dict = feedback.from_dict(feedback_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/pricing/FeedbackApi.md b/docs/pricing/FeedbackApi.md new file mode 100644 index 0000000..232cfd3 --- /dev/null +++ b/docs/pricing/FeedbackApi.md @@ -0,0 +1,968 @@ +# saasus_sdk_python.src.communication.FeedbackApi + +All URIs are relative to *https://api.saasus.io/v1/communication* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_feedback**](FeedbackApi.md#create_feedback) | **POST** /feedbacks | Create Feedback +[**create_feedback_comment**](FeedbackApi.md#create_feedback_comment) | **POST** /feedbacks/{feedback_id}/comments | Create Feedback Comment +[**create_vote_user**](FeedbackApi.md#create_vote_user) | **POST** /feedbacks/{feedback_id}/votes/users | Create Vote User +[**delete_feedback**](FeedbackApi.md#delete_feedback) | **DELETE** /feedbacks/{feedback_id} | Delete Feedback +[**delete_feedback_comment**](FeedbackApi.md#delete_feedback_comment) | **DELETE** /feedbacks/{feedback_id}/comments/{comment_id} | Delete Feedback Comment +[**delete_vote_for_feedback**](FeedbackApi.md#delete_vote_for_feedback) | **DELETE** /feedbacks/{feedback_id}/votes/users/{user_id} | Delete Vote For Feedback +[**get_feedback**](FeedbackApi.md#get_feedback) | **GET** /feedbacks/{feedback_id} | Get Feedback +[**get_feedback_comment**](FeedbackApi.md#get_feedback_comment) | **GET** /feedbacks/{feedback_id}/comments/{comment_id} | Get Feedback Comment +[**get_feedbacks**](FeedbackApi.md#get_feedbacks) | **GET** /feedbacks | Get Feedbacks +[**update_feedback**](FeedbackApi.md#update_feedback) | **PATCH** /feedbacks/{feedback_id} | Update Feedback +[**update_feedback_comment**](FeedbackApi.md#update_feedback_comment) | **PATCH** /feedbacks/{feedback_id}/comments/{comment_id} | Update Feedback Comment +[**update_feedback_status**](FeedbackApi.md#update_feedback_status) | **PATCH** /feedbacks/{feedback_id}/status | Update Feedback Status + + +# **create_feedback** +> Feedback create_feedback(create_feedback_param=create_feedback_param) + +Create Feedback + +Create Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + create_feedback_param = saasus_sdk_python.src.communication.CreateFeedbackParam() # CreateFeedbackParam | (optional) + + try: + # Create Feedback + api_response = api_instance.create_feedback(create_feedback_param=create_feedback_param) + print("The response of FeedbackApi->create_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_feedback_param** | [**CreateFeedbackParam**](CreateFeedbackParam.md)| | [optional] + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_feedback_comment** +> Comment create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + +Create Feedback Comment + +Post comment to feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_feedback_comment_param = saasus_sdk_python.src.communication.CreateFeedbackCommentParam() # CreateFeedbackCommentParam | (optional) + + try: + # Create Feedback Comment + api_response = api_instance.create_feedback_comment(feedback_id, create_feedback_comment_param=create_feedback_comment_param) + print("The response of FeedbackApi->create_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_feedback_comment_param** | [**CreateFeedbackCommentParam**](CreateFeedbackCommentParam.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_vote_user** +> Votes create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + +Create Vote User + +Vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.votes import Votes +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + create_vote_user_param = saasus_sdk_python.src.communication.CreateVoteUserParam() # CreateVoteUserParam | (optional) + + try: + # Create Vote User + api_response = api_instance.create_vote_user(feedback_id, create_vote_user_param=create_vote_user_param) + print("The response of FeedbackApi->create_vote_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->create_vote_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **create_vote_user_param** | [**CreateVoteUserParam**](CreateVoteUserParam.md)| | [optional] + +### Return type + +[**Votes**](Votes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback** +> delete_feedback(feedback_id) + +Delete Feedback + +Delete Feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Delete Feedback + api_instance.delete_feedback(feedback_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_feedback_comment** +> delete_feedback_comment(feedback_id, comment_id) + +Delete Feedback Comment + +Delete comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Delete Feedback Comment + api_instance.delete_feedback_comment(feedback_id, comment_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_vote_for_feedback** +> delete_vote_for_feedback(feedback_id, user_id) + +Delete Vote For Feedback + +Cancel vote for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + user_id = 'user_id_example' # str | + + try: + # Delete Vote For Feedback + api_instance.delete_vote_for_feedback(feedback_id, user_id) + except Exception as e: + print("Exception when calling FeedbackApi->delete_vote_for_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback** +> Feedback get_feedback(feedback_id) + +Get Feedback + +Retrieve feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + + try: + # Get Feedback + api_response = api_instance.get_feedback(feedback_id) + print("The response of FeedbackApi->get_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + +### Return type + +[**Feedback**](Feedback.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedback_comment** +> Comment get_feedback_comment(feedback_id, comment_id) + +Get Feedback Comment + +Retrieve comment from feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + + try: + # Get Feedback Comment + api_response = api_instance.get_feedback_comment(feedback_id, comment_id) + print("The response of FeedbackApi->get_feedback_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ok | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_feedbacks** +> Feedbacks get_feedbacks() + +Get Feedbacks + +Get the list of feedbacks. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + + try: + # Get Feedbacks + api_response = api_instance.get_feedbacks() + print("The response of FeedbackApi->get_feedbacks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FeedbackApi->get_feedbacks: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Feedbacks**](Feedbacks.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback** +> update_feedback(feedback_id, update_feedback_param=update_feedback_param) + +Update Feedback + +Edit feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_param = saasus_sdk_python.src.communication.UpdateFeedbackParam() # UpdateFeedbackParam | (optional) + + try: + # Update Feedback + api_instance.update_feedback(feedback_id, update_feedback_param=update_feedback_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_param** | [**UpdateFeedbackParam**](UpdateFeedbackParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_comment** +> update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + +Update Feedback Comment + +Edit comment for feedback. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + comment_id = 'comment_id_example' # str | + update_feedback_comment_param = saasus_sdk_python.src.communication.UpdateFeedbackCommentParam() # UpdateFeedbackCommentParam | (optional) + + try: + # Update Feedback Comment + api_instance.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param=update_feedback_comment_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_comment: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **comment_id** | **str**| | + **update_feedback_comment_param** | [**UpdateFeedbackCommentParam**](UpdateFeedbackCommentParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_feedback_status** +> update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + +Update Feedback Status + +Update Feedback Status. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.communication +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/communication +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.communication.Configuration( + host = "https://api.saasus.io/v1/communication" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.communication.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.communication.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.communication.FeedbackApi(api_client) + feedback_id = 'feedback_id_example' # str | + update_feedback_status_param = saasus_sdk_python.src.communication.UpdateFeedbackStatusParam() # UpdateFeedbackStatusParam | (optional) + + try: + # Update Feedback Status + api_instance.update_feedback_status(feedback_id, update_feedback_status_param=update_feedback_status_param) + except Exception as e: + print("Exception when calling FeedbackApi->update_feedback_status: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feedback_id** | **str**| | + **update_feedback_status_param** | [**UpdateFeedbackStatusParam**](UpdateFeedbackStatusParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/FeedbackSaveProps.md b/docs/pricing/FeedbackSaveProps.md new file mode 100644 index 0000000..522cd56 --- /dev/null +++ b/docs/pricing/FeedbackSaveProps.md @@ -0,0 +1,29 @@ +# FeedbackSaveProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSaveProps from a JSON string +feedback_save_props_instance = FeedbackSaveProps.from_json(json) +# print the JSON string representation of the object +print FeedbackSaveProps.to_json() + +# convert the object into a dict +feedback_save_props_dict = feedback_save_props_instance.to_dict() +# create an instance of FeedbackSaveProps from a dict +feedback_save_props_form_dict = feedback_save_props.from_dict(feedback_save_props_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/pricing/Feedbacks.md b/docs/pricing/Feedbacks.md new file mode 100644 index 0000000..5435095 --- /dev/null +++ b/docs/pricing/Feedbacks.md @@ -0,0 +1,28 @@ +# Feedbacks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedbacks** | [**List[Feedback]**](Feedback.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks + +# TODO update the JSON string below +json = "{}" +# create an instance of Feedbacks from a JSON string +feedbacks_instance = Feedbacks.from_json(json) +# print the JSON string representation of the object +print Feedbacks.to_json() + +# convert the object into a dict +feedbacks_dict = feedbacks_instance.to_dict() +# create an instance of Feedbacks from a dict +feedbacks_form_dict = feedbacks.from_dict(feedbacks_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/pricing/GetListingStatusResult.md b/docs/pricing/GetListingStatusResult.md new file mode 100644 index 0000000..e215d2e --- /dev/null +++ b/docs/pricing/GetListingStatusResult.md @@ -0,0 +1,28 @@ +# GetListingStatusResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult + +# TODO update the JSON string below +json = "{}" +# create an instance of GetListingStatusResult from a JSON string +get_listing_status_result_instance = GetListingStatusResult.from_json(json) +# print the JSON string representation of the object +print GetListingStatusResult.to_json() + +# convert the object into a dict +get_listing_status_result_dict = get_listing_status_result_instance.to_dict() +# create an instance of GetListingStatusResult from a dict +get_listing_status_result_form_dict = get_listing_status_result.from_dict(get_listing_status_result_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/pricing/IdentityProviderConfiguration.md b/docs/pricing/IdentityProviderConfiguration.md new file mode 100644 index 0000000..7e4cd8a --- /dev/null +++ b/docs/pricing/IdentityProviderConfiguration.md @@ -0,0 +1,32 @@ +# IdentityProviderConfiguration + +This information is required to set up sign-in using an external identity provider. It cannot be changed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | domain | +**redirect_url** | **str** | redirect URL | +**entity_id** | **str** | entity ID | +**reply_url** | **str** | reply URL | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderConfiguration from a JSON string +identity_provider_configuration_instance = IdentityProviderConfiguration.from_json(json) +# print the JSON string representation of the object +print IdentityProviderConfiguration.to_json() + +# convert the object into a dict +identity_provider_configuration_dict = identity_provider_configuration_instance.to_dict() +# create an instance of IdentityProviderConfiguration from a dict +identity_provider_configuration_form_dict = identity_provider_configuration.from_dict(identity_provider_configuration_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/pricing/IdentityProviderProps.md b/docs/pricing/IdentityProviderProps.md new file mode 100644 index 0000000..c465455 --- /dev/null +++ b/docs/pricing/IdentityProviderProps.md @@ -0,0 +1,31 @@ +# IdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **str** | | +**application_secret** | **str** | | +**approval_scope** | **str** | | +**is_button_hidden** | **bool** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderProps from a JSON string +identity_provider_props_instance = IdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print IdentityProviderProps.to_json() + +# convert the object into a dict +identity_provider_props_dict = identity_provider_props_instance.to_dict() +# create an instance of IdentityProviderProps from a dict +identity_provider_props_form_dict = identity_provider_props.from_dict(identity_provider_props_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/pricing/IdentityProviderSaml.md b/docs/pricing/IdentityProviderSaml.md new file mode 100644 index 0000000..f8a58ba --- /dev/null +++ b/docs/pricing/IdentityProviderSaml.md @@ -0,0 +1,29 @@ +# IdentityProviderSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviderSaml from a JSON string +identity_provider_saml_instance = IdentityProviderSaml.from_json(json) +# print the JSON string representation of the object +print IdentityProviderSaml.to_json() + +# convert the object into a dict +identity_provider_saml_dict = identity_provider_saml_instance.to_dict() +# create an instance of IdentityProviderSaml from a dict +identity_provider_saml_form_dict = identity_provider_saml.from_dict(identity_provider_saml_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/pricing/IdentityProviders.md b/docs/pricing/IdentityProviders.md new file mode 100644 index 0000000..45d4941 --- /dev/null +++ b/docs/pricing/IdentityProviders.md @@ -0,0 +1,28 @@ +# IdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**google** | [**IdentityProviderProps**](IdentityProviderProps.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of IdentityProviders from a JSON string +identity_providers_instance = IdentityProviders.from_json(json) +# print the JSON string representation of the object +print IdentityProviders.to_json() + +# convert the object into a dict +identity_providers_dict = identity_providers_instance.to_dict() +# create an instance of IdentityProviders from a dict +identity_providers_form_dict = identity_providers.from_dict(identity_providers_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/pricing/Invitation.md b/docs/pricing/Invitation.md new file mode 100644 index 0000000..0e1271d --- /dev/null +++ b/docs/pricing/Invitation.md @@ -0,0 +1,33 @@ +# Invitation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | Email address of the invited user | +**invitation_url** | **str** | Invitation URL | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | | +**expired_at** | **int** | Expiration date of the invitation | +**status** | [**InvitationStatus**](InvitationStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print Invitation.to_json() + +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_form_dict = invitation.from_dict(invitation_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/pricing/InvitationApi.md b/docs/pricing/InvitationApi.md new file mode 100644 index 0000000..130c6ca --- /dev/null +++ b/docs/pricing/InvitationApi.md @@ -0,0 +1,492 @@ +# saasus_sdk_python.src.auth.InvitationApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_invitation**](InvitationApi.md#create_tenant_invitation) | **POST** /tenants/{tenant_id}/invitations | Create Tenant Invitation +[**delete_tenant_invitation**](InvitationApi.md#delete_tenant_invitation) | **DELETE** /tenants/{tenant_id}/invitations/{invitation_id} | Delete Tenant Invitation +[**get_invitation_validity**](InvitationApi.md#get_invitation_validity) | **GET** /invitations/{invitation_id}/validity | Get Invitation Validity +[**get_tenant_invitation**](InvitationApi.md#get_tenant_invitation) | **GET** /tenants/{tenant_id}/invitations/{invitation_id} | Get Tenant Invitation +[**get_tenant_invitations**](InvitationApi.md#get_tenant_invitations) | **GET** /tenants/{tenant_id}/invitations | Get Tenant Invitations +[**validate_invitation**](InvitationApi.md#validate_invitation) | **PATCH** /invitations/{invitation_id}/validate | Validate Invitation + + +# **create_tenant_invitation** +> Invitation create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + +Create Tenant Invitation + +Create an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_invitation_param = saasus_sdk_python.src.auth.CreateTenantInvitationParam() # CreateTenantInvitationParam | (optional) + + try: + # Create Tenant Invitation + api_response = api_instance.create_tenant_invitation(tenant_id, create_tenant_invitation_param=create_tenant_invitation_param) + print("The response of InvitationApi->create_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->create_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_invitation_param** | [**CreateTenantInvitationParam**](CreateTenantInvitationParam.md)| | [optional] + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_invitation** +> delete_tenant_invitation(tenant_id, invitation_id) + +Delete Tenant Invitation + +Delete an invitation for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Delete Tenant Invitation + api_instance.delete_tenant_invitation(tenant_id, invitation_id) + except Exception as e: + print("Exception when calling InvitationApi->delete_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_invitation_validity** +> InvitationValidity get_invitation_validity(invitation_id) + +Get Invitation Validity + +Get the validity of an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Invitation Validity + api_response = api_instance.get_invitation_validity(invitation_id) + print("The response of InvitationApi->get_invitation_validity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_invitation_validity: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**InvitationValidity**](InvitationValidity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitation** +> Invitation get_tenant_invitation(tenant_id, invitation_id) + +Get Tenant Invitation + +Get invitation information for the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + invitation_id = 'invitation_id_example' # str | Invitation ID + + try: + # Get Tenant Invitation + api_response = api_instance.get_tenant_invitation(tenant_id, invitation_id) + print("The response of InvitationApi->get_tenant_invitation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **invitation_id** | **str**| Invitation ID | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_invitations** +> Invitations get_tenant_invitations(tenant_id) + +Get Tenant Invitations + +Get a list of invitations to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Invitations + api_response = api_instance.get_tenant_invitations(tenant_id) + print("The response of InvitationApi->get_tenant_invitations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitationApi->get_tenant_invitations: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Invitations**](Invitations.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **validate_invitation** +> validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + +Validate Invitation + +Validate an invitation to the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.InvitationApi(api_client) + invitation_id = 'invitation_id_example' # str | Invitation ID + validate_invitation_param = saasus_sdk_python.src.auth.ValidateInvitationParam() # ValidateInvitationParam | (optional) + + try: + # Validate Invitation + api_instance.validate_invitation(invitation_id, validate_invitation_param=validate_invitation_param) + except Exception as e: + print("Exception when calling InvitationApi->validate_invitation: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invitation_id** | **str**| Invitation ID | + **validate_invitation_param** | [**ValidateInvitationParam**](ValidateInvitationParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/InvitationStatus.md b/docs/pricing/InvitationStatus.md new file mode 100644 index 0000000..81bc630 --- /dev/null +++ b/docs/pricing/InvitationStatus.md @@ -0,0 +1,10 @@ +# InvitationStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/InvitationValidity.md b/docs/pricing/InvitationValidity.md new file mode 100644 index 0000000..d7324f0 --- /dev/null +++ b/docs/pricing/InvitationValidity.md @@ -0,0 +1,29 @@ +# InvitationValidity + +Invitation validity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Whether the validation is valid or not | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationValidity from a JSON string +invitation_validity_instance = InvitationValidity.from_json(json) +# print the JSON string representation of the object +print InvitationValidity.to_json() + +# convert the object into a dict +invitation_validity_dict = invitation_validity_instance.to_dict() +# create an instance of InvitationValidity from a dict +invitation_validity_form_dict = invitation_validity.from_dict(invitation_validity_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/pricing/Invitations.md b/docs/pricing/Invitations.md new file mode 100644 index 0000000..dd4cb9f --- /dev/null +++ b/docs/pricing/Invitations.md @@ -0,0 +1,28 @@ +# Invitations + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invitations** | [**List[Invitation]**](Invitation.md) | Invitation list | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invitations import Invitations + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitations from a JSON string +invitations_instance = Invitations.from_json(json) +# print the JSON string representation of the object +print Invitations.to_json() + +# convert the object into a dict +invitations_dict = invitations_instance.to_dict() +# create an instance of Invitations from a dict +invitations_form_dict = invitations.from_dict(invitations_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/pricing/InvitedUserEnvironmentInformationInner.md b/docs/pricing/InvitedUserEnvironmentInformationInner.md new file mode 100644 index 0000000..45fbb76 --- /dev/null +++ b/docs/pricing/InvitedUserEnvironmentInformationInner.md @@ -0,0 +1,29 @@ +# InvitedUserEnvironmentInformationInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**role_names** | **List[str]** | Role name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitedUserEnvironmentInformationInner from a JSON string +invited_user_environment_information_inner_instance = InvitedUserEnvironmentInformationInner.from_json(json) +# print the JSON string representation of the object +print InvitedUserEnvironmentInformationInner.to_json() + +# convert the object into a dict +invited_user_environment_information_inner_dict = invited_user_environment_information_inner_instance.to_dict() +# create an instance of InvitedUserEnvironmentInformationInner from a dict +invited_user_environment_information_inner_form_dict = invited_user_environment_information_inner.from_dict(invited_user_environment_information_inner_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/pricing/InvoiceLanguage.md b/docs/pricing/InvoiceLanguage.md new file mode 100644 index 0000000..025f6b8 --- /dev/null +++ b/docs/pricing/InvoiceLanguage.md @@ -0,0 +1,11 @@ +# InvoiceLanguage + +Language of invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/LinkAwsMarketplaceParam.md b/docs/pricing/LinkAwsMarketplaceParam.md new file mode 100644 index 0000000..17aaf81 --- /dev/null +++ b/docs/pricing/LinkAwsMarketplaceParam.md @@ -0,0 +1,30 @@ +# LinkAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | +**access_token** | **str** | Access token | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of LinkAwsMarketplaceParam from a JSON string +link_aws_marketplace_param_instance = LinkAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print LinkAwsMarketplaceParam.to_json() + +# convert the object into a dict +link_aws_marketplace_param_dict = link_aws_marketplace_param_instance.to_dict() +# create an instance of LinkAwsMarketplaceParam from a dict +link_aws_marketplace_param_form_dict = link_aws_marketplace_param.from_dict(link_aws_marketplace_param_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/pricing/ListingStatus.md b/docs/pricing/ListingStatus.md new file mode 100644 index 0000000..e022cd7 --- /dev/null +++ b/docs/pricing/ListingStatus.md @@ -0,0 +1,10 @@ +# ListingStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/MessageTemplate.md b/docs/pricing/MessageTemplate.md new file mode 100644 index 0000000..988cded --- /dev/null +++ b/docs/pricing/MessageTemplate.md @@ -0,0 +1,29 @@ +# MessageTemplate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | Title | +**message** | **str** | Message | + +## Example + +```python +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageTemplate from a JSON string +message_template_instance = MessageTemplate.from_json(json) +# print the JSON string representation of the object +print MessageTemplate.to_json() + +# convert the object into a dict +message_template_dict = message_template_instance.to_dict() +# create an instance of MessageTemplate from a dict +message_template_form_dict = message_template.from_dict(message_template_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/pricing/MeteringApi.md b/docs/pricing/MeteringApi.md new file mode 100644 index 0000000..f4dd431 --- /dev/null +++ b/docs/pricing/MeteringApi.md @@ -0,0 +1,1146 @@ +# saasus_sdk_python.src.pricing.MeteringApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_metering_unit**](MeteringApi.md#create_metering_unit) | **POST** /metering/units | Create Metering Unit +[**delete_metering_unit_by_id**](MeteringApi.md#delete_metering_unit_by_id) | **DELETE** /metering/units/{metering_unit_id} | Delete Metering Unit +[**delete_metering_unit_timestamp_count**](MeteringApi.md#delete_metering_unit_timestamp_count) | **DELETE** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Delete Metering Unit Count for Specified Timestamp +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date} | Get Metering Unit Count for Specific Date +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period | Obtain metering unit counts for a specified date/time period +[**get_metering_unit_date_count_by_tenant_id_and_unit_name_today**](MeteringApi.md#get_metering_unit_date_count_by_tenant_id_and_unit_name_today) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/today | Get Metering Unit Count for the Current Day +[**get_metering_unit_date_counts_by_tenant_id_and_date**](MeteringApi.md#get_metering_unit_date_counts_by_tenant_id_and_date) | **GET** /metering/tenants/{tenant_id}/units/date/{date} | Get All Metering Unit Counts for a Specified Date +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month} | Get the Metering Unit Count for the Specified Month +[**get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month**](MeteringApi.md#get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month) | **GET** /metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth | Get Metering Unit Count for the Current Month +[**get_metering_unit_month_counts_by_tenant_id_and_month**](MeteringApi.md#get_metering_unit_month_counts_by_tenant_id_and_month) | **GET** /metering/tenants/{tenant_id}/units/month/{month} | Get All Metering Unit Counts for the Specified Month +[**get_metering_units**](MeteringApi.md#get_metering_units) | **GET** /metering/units | Get all metering units +[**update_metering_unit_by_id**](MeteringApi.md#update_metering_unit_by_id) | **PATCH** /metering/units/{metering_unit_id} | Update Metering Unit +[**update_metering_unit_timestamp_count**](MeteringApi.md#update_metering_unit_timestamp_count) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp} | Update Metering Unit Count for Specified Timestamp +[**update_metering_unit_timestamp_count_now**](MeteringApi.md#update_metering_unit_timestamp_count_now) | **PUT** /metering/tenants/{tenant_id}/units/{metering_unit_name}/now | Update Metering Unit Count for Current Time + + +# **create_metering_unit** +> MeteringUnit create_metering_unit(body=body) + +Create Metering Unit + +Create a metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Create Metering Unit + api_response = api_instance.create_metering_unit(body=body) + print("The response of MeteringApi->create_metering_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->create_metering_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +[**MeteringUnit**](MeteringUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_by_id** +> delete_metering_unit_by_id(metering_unit_id) + +Delete Metering Unit + +Delete metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + + try: + # Delete Metering Unit + api_instance.delete_metering_unit_by_id(metering_unit_id) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_metering_unit_timestamp_count** +> delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + +Delete Metering Unit Count for Specified Timestamp + +Deletes metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + + try: + # Delete Metering Unit Count for Specified Timestamp + api_instance.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp) + except Exception as e: + print("Exception when calling MeteringApi->delete_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + +Get Metering Unit Count for Specific Date + +Gets the metering unit count for a specific date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + var_date = '2022-01-01' # str | Date + + try: + # Get Metering Unit Count for Specific Date + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period** +> MeteringUnitDatePeriodCounts get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + +Obtain metering unit counts for a specified date/time period + +Obtain metering unit counts for a specified date/time period. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + start_timestamp = 1640995200 # int | Start Date-Time (optional) + end_timestamp = 1640995200 # int | End Date-Time (optional) + + try: + # Obtain metering unit counts for a specified date/time period + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp=start_timestamp, end_timestamp=end_timestamp) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **start_timestamp** | **int**| Start Date-Time | [optional] + **end_timestamp** | **int**| End Date-Time | [optional] + +### Return type + +[**MeteringUnitDatePeriodCounts**](MeteringUnitDatePeriodCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_count_by_tenant_id_and_unit_name_today** +> MeteringUnitDateCount get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Day + +Get the metering unit count for the current day. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Day + api_response = api_instance.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_count_by_tenant_id_and_unit_name_today: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitDateCount**](MeteringUnitDateCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_date_counts_by_tenant_id_and_date** +> MeteringUnitDateCounts get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + +Get All Metering Unit Counts for a Specified Date + +Gets the total metering unit count for the specified date. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + var_date = '2022-01-01' # str | Date + + try: + # Get All Metering Unit Counts for a Specified Date + api_response = api_instance.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date) + print("The response of MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_date_counts_by_tenant_id_and_date: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **var_date** | **str**| Date | + +### Return type + +[**MeteringUnitDateCounts**](MeteringUnitDateCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + +Get the Metering Unit Count for the Specified Month + +Gets the metering unit count for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + month = '2022-01' # str | Month + + try: + # Get the Metering Unit Count for the Specified Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month** +> MeteringUnitMonthCount get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + +Get Metering Unit Count for the Current Month + +Get the metering unit count for the current month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + + try: + # Get Metering Unit Count for the Current Month + api_response = api_instance.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name) + print("The response of MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + +### Return type + +[**MeteringUnitMonthCount**](MeteringUnitMonthCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_unit_month_counts_by_tenant_id_and_month** +> MeteringUnitMonthCounts get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + +Get All Metering Unit Counts for the Specified Month + +Gets all metering unit counts for the specified month. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + month = '2022-01' # str | Month + + try: + # Get All Metering Unit Counts for the Specified Month + api_response = api_instance.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month) + print("The response of MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_unit_month_counts_by_tenant_id_and_month: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **month** | **str**| Month | + +### Return type + +[**MeteringUnitMonthCounts**](MeteringUnitMonthCounts.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_metering_units** +> MeteringUnits get_metering_units() + +Get all metering units + +Get all metering units. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + + try: + # Get all metering units + api_response = api_instance.get_metering_units() + print("The response of MeteringApi->get_metering_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->get_metering_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**MeteringUnits**](MeteringUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_by_id** +> update_metering_unit_by_id(metering_unit_id, body=body) + +Update Metering Unit + +Update metering unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + metering_unit_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Metering Unit ID + body = saasus_sdk_python.src.pricing.MeteringUnitProps() # MeteringUnitProps | (optional) + + try: + # Update Metering Unit + api_instance.update_metering_unit_by_id(metering_unit_id, body=body) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_by_id: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **metering_unit_id** | **str**| Metering Unit ID | + **body** | **MeteringUnitProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + +Update Metering Unit Count for Specified Timestamp + +Update metering unit count for the specified timestamp. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + timestamp = 1640995200 # int | Timestamp + update_metering_unit_timestamp_count_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountParam() # UpdateMeteringUnitTimestampCountParam | (optional) + + try: + # Update Metering Unit Count for Specified Timestamp + api_response = api_instance.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param=update_metering_unit_timestamp_count_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **timestamp** | **int**| Timestamp | + **update_metering_unit_timestamp_count_param** | [**UpdateMeteringUnitTimestampCountParam**](UpdateMeteringUnitTimestampCountParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_metering_unit_timestamp_count_now** +> MeteringUnitTimestampCount update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + +Update Metering Unit Count for Current Time + +Update the metering unit count for the current time. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.MeteringApi(api_client) + tenant_id = '46af35b5-60de-4cd8-9412-19a3a5d1f838' # str | Tenant ID + metering_unit_name = 'storage_unit' # str | Metering Unit Name + update_metering_unit_timestamp_count_now_param = saasus_sdk_python.src.pricing.UpdateMeteringUnitTimestampCountNowParam() # UpdateMeteringUnitTimestampCountNowParam | (optional) + + try: + # Update Metering Unit Count for Current Time + api_response = api_instance.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param=update_metering_unit_timestamp_count_now_param) + print("The response of MeteringApi->update_metering_unit_timestamp_count_now:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MeteringApi->update_metering_unit_timestamp_count_now: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **metering_unit_name** | **str**| Metering Unit Name | + **update_metering_unit_timestamp_count_now_param** | [**UpdateMeteringUnitTimestampCountNowParam**](UpdateMeteringUnitTimestampCountNowParam.md)| | [optional] + +### Return type + +[**MeteringUnitTimestampCount**](MeteringUnitTimestampCount.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/MeteringUnit.md b/docs/pricing/MeteringUnit.md new file mode 100644 index 0000000..d185dc9 --- /dev/null +++ b/docs/pricing/MeteringUnit.md @@ -0,0 +1,33 @@ +# MeteringUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | Metering unit used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnit from a JSON string +metering_unit_instance = MeteringUnit.from_json(json) +# print the JSON string representation of the object +print MeteringUnit.to_json() + +# convert the object into a dict +metering_unit_dict = metering_unit_instance.to_dict() +# create an instance of MeteringUnit from a dict +metering_unit_form_dict = metering_unit.from_dict(metering_unit_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/pricing/MeteringUnitCount.md b/docs/pricing/MeteringUnitCount.md new file mode 100644 index 0000000..4696cc9 --- /dev/null +++ b/docs/pricing/MeteringUnitCount.md @@ -0,0 +1,29 @@ +# MeteringUnitCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitCount from a JSON string +metering_unit_count_instance = MeteringUnitCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitCount.to_json() + +# convert the object into a dict +metering_unit_count_dict = metering_unit_count_instance.to_dict() +# create an instance of MeteringUnitCount from a dict +metering_unit_count_form_dict = metering_unit_count.from_dict(metering_unit_count_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/pricing/MeteringUnitDateCount.md b/docs/pricing/MeteringUnitDateCount.md new file mode 100644 index 0000000..263abc4 --- /dev/null +++ b/docs/pricing/MeteringUnitDateCount.md @@ -0,0 +1,30 @@ +# MeteringUnitDateCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**var_date** | **str** | Date | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCount from a JSON string +metering_unit_date_count_instance = MeteringUnitDateCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCount.to_json() + +# convert the object into a dict +metering_unit_date_count_dict = metering_unit_date_count_instance.to_dict() +# create an instance of MeteringUnitDateCount from a dict +metering_unit_date_count_form_dict = metering_unit_date_count.from_dict(metering_unit_date_count_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/pricing/MeteringUnitDateCounts.md b/docs/pricing/MeteringUnitDateCounts.md new file mode 100644 index 0000000..ad64ff3 --- /dev/null +++ b/docs/pricing/MeteringUnitDateCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitDateCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitDateCount]**](MeteringUnitDateCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDateCounts from a JSON string +metering_unit_date_counts_instance = MeteringUnitDateCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDateCounts.to_json() + +# convert the object into a dict +metering_unit_date_counts_dict = metering_unit_date_counts_instance.to_dict() +# create an instance of MeteringUnitDateCounts from a dict +metering_unit_date_counts_form_dict = metering_unit_date_counts.from_dict(metering_unit_date_counts_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/pricing/MeteringUnitDatePeriodCounts.md b/docs/pricing/MeteringUnitDatePeriodCounts.md new file mode 100644 index 0000000..1bc397f --- /dev/null +++ b/docs/pricing/MeteringUnitDatePeriodCounts.md @@ -0,0 +1,29 @@ +# MeteringUnitDatePeriodCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**counts** | [**List[MeteringUnitCount]**](MeteringUnitCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitDatePeriodCounts from a JSON string +metering_unit_date_period_counts_instance = MeteringUnitDatePeriodCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitDatePeriodCounts.to_json() + +# convert the object into a dict +metering_unit_date_period_counts_dict = metering_unit_date_period_counts_instance.to_dict() +# create an instance of MeteringUnitDatePeriodCounts from a dict +metering_unit_date_period_counts_form_dict = metering_unit_date_period_counts.from_dict(metering_unit_date_period_counts_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/pricing/MeteringUnitMonthCount.md b/docs/pricing/MeteringUnitMonthCount.md new file mode 100644 index 0000000..4856f9c --- /dev/null +++ b/docs/pricing/MeteringUnitMonthCount.md @@ -0,0 +1,30 @@ +# MeteringUnitMonthCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**month** | **str** | Month | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCount from a JSON string +metering_unit_month_count_instance = MeteringUnitMonthCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCount.to_json() + +# convert the object into a dict +metering_unit_month_count_dict = metering_unit_month_count_instance.to_dict() +# create an instance of MeteringUnitMonthCount from a dict +metering_unit_month_count_form_dict = metering_unit_month_count.from_dict(metering_unit_month_count_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/pricing/MeteringUnitMonthCounts.md b/docs/pricing/MeteringUnitMonthCounts.md new file mode 100644 index 0000000..b8ac3e1 --- /dev/null +++ b/docs/pricing/MeteringUnitMonthCounts.md @@ -0,0 +1,28 @@ +# MeteringUnitMonthCounts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counts** | [**List[MeteringUnitMonthCount]**](MeteringUnitMonthCount.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitMonthCounts from a JSON string +metering_unit_month_counts_instance = MeteringUnitMonthCounts.from_json(json) +# print the JSON string representation of the object +print MeteringUnitMonthCounts.to_json() + +# convert the object into a dict +metering_unit_month_counts_dict = metering_unit_month_counts_instance.to_dict() +# create an instance of MeteringUnitMonthCounts from a dict +metering_unit_month_counts_form_dict = metering_unit_month_counts.from_dict(metering_unit_month_counts_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/pricing/MeteringUnitProps.md b/docs/pricing/MeteringUnitProps.md new file mode 100644 index 0000000..554cab4 --- /dev/null +++ b/docs/pricing/MeteringUnitProps.md @@ -0,0 +1,31 @@ +# MeteringUnitProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitProps from a JSON string +metering_unit_props_instance = MeteringUnitProps.from_json(json) +# print the JSON string representation of the object +print MeteringUnitProps.to_json() + +# convert the object into a dict +metering_unit_props_dict = metering_unit_props_instance.to_dict() +# create an instance of MeteringUnitProps from a dict +metering_unit_props_form_dict = metering_unit_props.from_dict(metering_unit_props_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/pricing/MeteringUnitTimestampCount.md b/docs/pricing/MeteringUnitTimestampCount.md new file mode 100644 index 0000000..b0fa3ab --- /dev/null +++ b/docs/pricing/MeteringUnitTimestampCount.md @@ -0,0 +1,30 @@ +# MeteringUnitTimestampCount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metering_unit_name** | **str** | Metering unit name | +**timestamp** | **int** | Timestamp | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnitTimestampCount from a JSON string +metering_unit_timestamp_count_instance = MeteringUnitTimestampCount.from_json(json) +# print the JSON string representation of the object +print MeteringUnitTimestampCount.to_json() + +# convert the object into a dict +metering_unit_timestamp_count_dict = metering_unit_timestamp_count_instance.to_dict() +# create an instance of MeteringUnitTimestampCount from a dict +metering_unit_timestamp_count_form_dict = metering_unit_timestamp_count.from_dict(metering_unit_timestamp_count_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/pricing/MeteringUnits.md b/docs/pricing/MeteringUnits.md new file mode 100644 index 0000000..af0d28c --- /dev/null +++ b/docs/pricing/MeteringUnits.md @@ -0,0 +1,28 @@ +# MeteringUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[MeteringUnit]**](MeteringUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteringUnits from a JSON string +metering_units_instance = MeteringUnits.from_json(json) +# print the JSON string representation of the object +print MeteringUnits.to_json() + +# convert the object into a dict +metering_units_dict = metering_units_instance.to_dict() +# create an instance of MeteringUnits from a dict +metering_units_form_dict = metering_units.from_dict(metering_units_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/pricing/MfaConfiguration.md b/docs/pricing/MfaConfiguration.md new file mode 100644 index 0000000..ed57143 --- /dev/null +++ b/docs/pricing/MfaConfiguration.md @@ -0,0 +1,29 @@ +# MfaConfiguration + +MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mfa_configuration** | **str** | on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. | + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaConfiguration from a JSON string +mfa_configuration_instance = MfaConfiguration.from_json(json) +# print the JSON string representation of the object +print MfaConfiguration.to_json() + +# convert the object into a dict +mfa_configuration_dict = mfa_configuration_instance.to_dict() +# create an instance of MfaConfiguration from a dict +mfa_configuration_form_dict = mfa_configuration.from_dict(mfa_configuration_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/pricing/MfaPreference.md b/docs/pricing/MfaPreference.md new file mode 100644 index 0000000..b93f085 --- /dev/null +++ b/docs/pricing/MfaPreference.md @@ -0,0 +1,29 @@ +# MfaPreference + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable MFA | +**method** | **str** | MFA method (required if enabled is true) | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference + +# TODO update the JSON string below +json = "{}" +# create an instance of MfaPreference from a JSON string +mfa_preference_instance = MfaPreference.from_json(json) +# print the JSON string representation of the object +print MfaPreference.to_json() + +# convert the object into a dict +mfa_preference_dict = mfa_preference_instance.to_dict() +# create an instance of MfaPreference from a dict +mfa_preference_form_dict = mfa_preference.from_dict(mfa_preference_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/pricing/NotificationMessages.md b/docs/pricing/NotificationMessages.md new file mode 100644 index 0000000..9f4dbd5 --- /dev/null +++ b/docs/pricing/NotificationMessages.md @@ -0,0 +1,36 @@ +# NotificationMessages + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationMessages from a JSON string +notification_messages_instance = NotificationMessages.from_json(json) +# print the JSON string representation of the object +print NotificationMessages.to_json() + +# convert the object into a dict +notification_messages_dict = notification_messages_instance.to_dict() +# create an instance of NotificationMessages from a dict +notification_messages_form_dict = notification_messages.from_dict(notification_messages_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/pricing/PasswordPolicy.md b/docs/pricing/PasswordPolicy.md new file mode 100644 index 0000000..f537301 --- /dev/null +++ b/docs/pricing/PasswordPolicy.md @@ -0,0 +1,34 @@ +# PasswordPolicy + +Password Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**minimum_length** | **int** | Minimum number of characters | +**is_require_lowercase** | **bool** | Contains one or more lowercase characters | +**is_require_numbers** | **bool** | Contains one or more numeric characters | +**is_require_symbols** | **bool** | Contains one or more special characters | +**is_require_uppercase** | **bool** | Contains one or more uppercase letters | +**temporary_password_validity_days** | **int** | Temporary password expiration date | + +## Example + +```python +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordPolicy from a JSON string +password_policy_instance = PasswordPolicy.from_json(json) +# print the JSON string representation of the object +print PasswordPolicy.to_json() + +# convert the object into a dict +password_policy_dict = password_policy_instance.to_dict() +# create an instance of PasswordPolicy from a dict +password_policy_form_dict = password_policy.from_dict(password_policy_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/pricing/Plan.md b/docs/pricing/Plan.md new file mode 100644 index 0000000..a78bd6a --- /dev/null +++ b/docs/pricing/Plan.md @@ -0,0 +1,29 @@ +# Plan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print Plan.to_json() + +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_form_dict = plan.from_dict(plan_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/pricing/PlanHistories.md b/docs/pricing/PlanHistories.md new file mode 100644 index 0000000..245a1ef --- /dev/null +++ b/docs/pricing/PlanHistories.md @@ -0,0 +1,28 @@ +# PlanHistories + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistories from a JSON string +plan_histories_instance = PlanHistories.from_json(json) +# print the JSON string representation of the object +print PlanHistories.to_json() + +# convert the object into a dict +plan_histories_dict = plan_histories_instance.to_dict() +# create an instance of PlanHistories from a dict +plan_histories_form_dict = plan_histories.from_dict(plan_histories_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/pricing/PlanHistory.md b/docs/pricing/PlanHistory.md new file mode 100644 index 0000000..0e2326b --- /dev/null +++ b/docs/pricing/PlanHistory.md @@ -0,0 +1,32 @@ +# PlanHistory + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_applied_at** | **int** | Registration date | +**tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanHistory from a JSON string +plan_history_instance = PlanHistory.from_json(json) +# print the JSON string representation of the object +print PlanHistory.to_json() + +# convert the object into a dict +plan_history_dict = plan_history_instance.to_dict() +# create an instance of PlanHistory from a dict +plan_history_form_dict = plan_history.from_dict(plan_history_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/pricing/PlanReservation.md b/docs/pricing/PlanReservation.md new file mode 100644 index 0000000..fa93af8 --- /dev/null +++ b/docs/pricing/PlanReservation.md @@ -0,0 +1,32 @@ +# PlanReservation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanReservation from a JSON string +plan_reservation_instance = PlanReservation.from_json(json) +# print the JSON string representation of the object +print PlanReservation.to_json() + +# convert the object into a dict +plan_reservation_dict = plan_reservation_instance.to_dict() +# create an instance of PlanReservation from a dict +plan_reservation_form_dict = plan_reservation.from_dict(plan_reservation_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/pricing/Plans.md b/docs/pricing/Plans.md new file mode 100644 index 0000000..3f51074 --- /dev/null +++ b/docs/pricing/Plans.md @@ -0,0 +1,28 @@ +# Plans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plans** | [**List[Plan]**](Plan.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans + +# TODO update the JSON string below +json = "{}" +# create an instance of Plans from a JSON string +plans_instance = Plans.from_json(json) +# print the JSON string representation of the object +print Plans.to_json() + +# convert the object into a dict +plans_dict = plans_instance.to_dict() +# create an instance of Plans from a dict +plans_form_dict = plans.from_dict(plans_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/pricing/PricingFixedUnit.md b/docs/pricing/PricingFixedUnit.md new file mode 100644 index 0000000..f42db7d --- /dev/null +++ b/docs/pricing/PricingFixedUnit.md @@ -0,0 +1,36 @@ +# PricingFixedUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnit from a JSON string +pricing_fixed_unit_instance = PricingFixedUnit.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnit.to_json() + +# convert the object into a dict +pricing_fixed_unit_dict = pricing_fixed_unit_instance.to_dict() +# create an instance of PricingFixedUnit from a dict +pricing_fixed_unit_form_dict = pricing_fixed_unit.from_dict(pricing_fixed_unit_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/pricing/PricingFixedUnitForSave.md b/docs/pricing/PricingFixedUnitForSave.md new file mode 100644 index 0000000..be59cbc --- /dev/null +++ b/docs/pricing/PricingFixedUnitForSave.md @@ -0,0 +1,34 @@ +# PricingFixedUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingFixedUnitForSave from a JSON string +pricing_fixed_unit_for_save_instance = PricingFixedUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingFixedUnitForSave.to_json() + +# convert the object into a dict +pricing_fixed_unit_for_save_dict = pricing_fixed_unit_for_save_instance.to_dict() +# create an instance of PricingFixedUnitForSave from a dict +pricing_fixed_unit_for_save_form_dict = pricing_fixed_unit_for_save.from_dict(pricing_fixed_unit_for_save_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/pricing/PricingMenu.md b/docs/pricing/PricingMenu.md new file mode 100644 index 0000000..ff4a531 --- /dev/null +++ b/docs/pricing/PricingMenu.md @@ -0,0 +1,33 @@ +# PricingMenu + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenu from a JSON string +pricing_menu_instance = PricingMenu.from_json(json) +# print the JSON string representation of the object +print PricingMenu.to_json() + +# convert the object into a dict +pricing_menu_dict = pricing_menu_instance.to_dict() +# create an instance of PricingMenu from a dict +pricing_menu_form_dict = pricing_menu.from_dict(pricing_menu_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/pricing/PricingMenuProps.md b/docs/pricing/PricingMenuProps.md new file mode 100644 index 0000000..7080010 --- /dev/null +++ b/docs/pricing/PricingMenuProps.md @@ -0,0 +1,32 @@ +# PricingMenuProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**used** | **bool** | Menu used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenuProps from a JSON string +pricing_menu_props_instance = PricingMenuProps.from_json(json) +# print the JSON string representation of the object +print PricingMenuProps.to_json() + +# convert the object into a dict +pricing_menu_props_dict = pricing_menu_props_instance.to_dict() +# create an instance of PricingMenuProps from a dict +pricing_menu_props_form_dict = pricing_menu_props.from_dict(pricing_menu_props_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/pricing/PricingMenus.md b/docs/pricing/PricingMenus.md new file mode 100644 index 0000000..bcc23d2 --- /dev/null +++ b/docs/pricing/PricingMenus.md @@ -0,0 +1,28 @@ +# PricingMenus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingMenus from a JSON string +pricing_menus_instance = PricingMenus.from_json(json) +# print the JSON string representation of the object +print PricingMenus.to_json() + +# convert the object into a dict +pricing_menus_dict = pricing_menus_instance.to_dict() +# create an instance of PricingMenus from a dict +pricing_menus_form_dict = pricing_menus.from_dict(pricing_menus_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/pricing/PricingMenusApi.md b/docs/pricing/PricingMenusApi.md new file mode 100644 index 0000000..6ae1b2f --- /dev/null +++ b/docs/pricing/PricingMenusApi.md @@ -0,0 +1,398 @@ +# saasus_sdk_python.src.pricing.PricingMenusApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_menu**](PricingMenusApi.md#create_pricing_menu) | **POST** /menus | Create a Pricing Feature Menu +[**delete_pricing_menu**](PricingMenusApi.md#delete_pricing_menu) | **DELETE** /menus/{menu_id} | Delete Pricing Feature Menu +[**get_pricing_menu**](PricingMenusApi.md#get_pricing_menu) | **GET** /menus/{menu_id} | Get Pricing Feature Menu +[**get_pricing_menus**](PricingMenusApi.md#get_pricing_menus) | **GET** /menus | Get Pricing Feature Menus +[**update_pricing_menu**](PricingMenusApi.md#update_pricing_menu) | **PATCH** /menus/{menu_id} | Update Pricing Feature Menu + + +# **create_pricing_menu** +> PricingMenu create_pricing_menu(body=body) + +Create a Pricing Feature Menu + +Create a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Create a Pricing Feature Menu + api_response = api_instance.create_pricing_menu(body=body) + print("The response of PricingMenusApi->create_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->create_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_menu** +> delete_pricing_menu(menu_id) + +Delete Pricing Feature Menu + +Delete pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Delete Pricing Feature Menu + api_instance.delete_pricing_menu(menu_id) + except Exception as e: + print("Exception when calling PricingMenusApi->delete_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menu** +> PricingMenu get_pricing_menu(menu_id) + +Get Pricing Feature Menu + +Get a pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + + try: + # Get Pricing Feature Menu + api_response = api_instance.get_pricing_menu(menu_id) + print("The response of PricingMenusApi->get_pricing_menu:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + +### Return type + +[**PricingMenu**](PricingMenu.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_menus** +> PricingMenus get_pricing_menus() + +Get Pricing Feature Menus + +Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + + try: + # Get Pricing Feature Menus + api_response = api_instance.get_pricing_menus() + print("The response of PricingMenusApi->get_pricing_menus:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingMenusApi->get_pricing_menus: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingMenus**](PricingMenus.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_menu** +> update_pricing_menu(menu_id, body=body) + +Update Pricing Feature Menu + +Update pricing feature menu. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingMenusApi(api_client) + menu_id = 'menu_id_example' # str | Menu ID + body = saasus_sdk_python.src.pricing.SavePricingMenuParam() # SavePricingMenuParam | (optional) + + try: + # Update Pricing Feature Menu + api_instance.update_pricing_menu(menu_id, body=body) + except Exception as e: + print("Exception when calling PricingMenusApi->update_pricing_menu: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **menu_id** | **str**| Menu ID | + **body** | **SavePricingMenuParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/PricingPlan.md b/docs/pricing/PricingPlan.md new file mode 100644 index 0000000..4598bdf --- /dev/null +++ b/docs/pricing/PricingPlan.md @@ -0,0 +1,33 @@ +# PricingPlan + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlan from a JSON string +pricing_plan_instance = PricingPlan.from_json(json) +# print the JSON string representation of the object +print PricingPlan.to_json() + +# convert the object into a dict +pricing_plan_dict = pricing_plan_instance.to_dict() +# create an instance of PricingPlan from a dict +pricing_plan_form_dict = pricing_plan.from_dict(pricing_plan_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/pricing/PricingPlanProps.md b/docs/pricing/PricingPlanProps.md new file mode 100644 index 0000000..73f7464 --- /dev/null +++ b/docs/pricing/PricingPlanProps.md @@ -0,0 +1,32 @@ +# PricingPlanProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_menus** | [**List[PricingMenu]**](PricingMenu.md) | | +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**used** | **bool** | Pricing plan used settings | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlanProps from a JSON string +pricing_plan_props_instance = PricingPlanProps.from_json(json) +# print the JSON string representation of the object +print PricingPlanProps.to_json() + +# convert the object into a dict +pricing_plan_props_dict = pricing_plan_props_instance.to_dict() +# create an instance of PricingPlanProps from a dict +pricing_plan_props_form_dict = pricing_plan_props.from_dict(pricing_plan_props_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/pricing/PricingPlans.md b/docs/pricing/PricingPlans.md new file mode 100644 index 0000000..f326557 --- /dev/null +++ b/docs/pricing/PricingPlans.md @@ -0,0 +1,28 @@ +# PricingPlans + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pricing_plans** | [**List[PricingPlan]**](PricingPlan.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingPlans from a JSON string +pricing_plans_instance = PricingPlans.from_json(json) +# print the JSON string representation of the object +print PricingPlans.to_json() + +# convert the object into a dict +pricing_plans_dict = pricing_plans_instance.to_dict() +# create an instance of PricingPlans from a dict +pricing_plans_form_dict = pricing_plans.from_dict(pricing_plans_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/pricing/PricingPlansApi.md b/docs/pricing/PricingPlansApi.md new file mode 100644 index 0000000..cb59c8f --- /dev/null +++ b/docs/pricing/PricingPlansApi.md @@ -0,0 +1,691 @@ +# saasus_sdk_python.src.pricing.PricingPlansApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_plan**](PricingPlansApi.md#create_pricing_plan) | **POST** /plans | Create Pricing Plan +[**delete_all_plans_and_menus_and_units_and_meters_and_tax_rates**](PricingPlansApi.md#delete_all_plans_and_menus_and_units_and_meters_and_tax_rates) | **DELETE** /plans-initialization | Delete all Plans, Menus, Units, Meters and Tax Rates +[**delete_pricing_plan**](PricingPlansApi.md#delete_pricing_plan) | **DELETE** /plans/{plan_id} | Delete Pricing Plan +[**delete_stripe_plan**](PricingPlansApi.md#delete_stripe_plan) | **DELETE** /stripe | Delete Product Data from Stripe +[**get_pricing_plan**](PricingPlansApi.md#get_pricing_plan) | **GET** /plans/{plan_id} | Get Pricing Plan +[**get_pricing_plans**](PricingPlansApi.md#get_pricing_plans) | **GET** /plans | Get Pricing Plans +[**link_plan_to_stripe**](PricingPlansApi.md#link_plan_to_stripe) | **PATCH** /stripe/init | Connect to Stripe +[**update_pricing_plan**](PricingPlansApi.md#update_pricing_plan) | **PATCH** /plans/{plan_id} | Update Pricing Plan +[**update_pricing_plans_used**](PricingPlansApi.md#update_pricing_plans_used) | **PATCH** /plans/used | Update Used Flag + + +# **create_pricing_plan** +> PricingPlan create_pricing_plan(body=body) + +Create Pricing Plan + +Create a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Create Pricing Plan + api_response = api_instance.create_pricing_plan(body=body) + print("The response of PricingPlansApi->create_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->create_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_all_plans_and_menus_and_units_and_meters_and_tax_rates** +> delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + +Delete all Plans, Menus, Units, Meters and Tax Rates + +Unconditionally remove all rate plans, menus, units, meters and tax rates. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete all Plans, Menus, Units, Meters and Tax Rates + api_instance.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_all_plans_and_menus_and_units_and_meters_and_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_plan** +> delete_pricing_plan(plan_id) + +Delete Pricing Plan + +Delete a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Delete Pricing Plan + api_instance.delete_pricing_plan(plan_id) + except Exception as e: + print("Exception when calling PricingPlansApi->delete_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_plan** +> delete_stripe_plan() + +Delete Product Data from Stripe + +Delete product data from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Delete Product Data from Stripe + api_instance.delete_stripe_plan() + except Exception as e: + print("Exception when calling PricingPlansApi->delete_stripe_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plan** +> PricingPlan get_pricing_plan(plan_id) + +Get Pricing Plan + +Get a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + + try: + # Get Pricing Plan + api_response = api_instance.get_pricing_plan(plan_id) + print("The response of PricingPlansApi->get_pricing_plan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + +### Return type + +[**PricingPlan**](PricingPlan.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_plans** +> PricingPlans get_pricing_plans() + +Get Pricing Plans + +Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Get Pricing Plans + api_response = api_instance.get_pricing_plans() + print("The response of PricingPlansApi->get_pricing_plans:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingPlansApi->get_pricing_plans: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingPlans**](PricingPlans.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_plan_to_stripe** +> link_plan_to_stripe() + +Connect to Stripe + +Connect information to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + + try: + # Connect to Stripe + api_instance.link_plan_to_stripe() + except Exception as e: + print("Exception when calling PricingPlansApi->link_plan_to_stripe: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plan** +> update_pricing_plan(plan_id, body=body) + +Update Pricing Plan + +Update a pricing plan. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + plan_id = 'plan_id_example' # str | Pricing Plan ID + body = saasus_sdk_python.src.pricing.SavePricingPlanParam() # SavePricingPlanParam | (optional) + + try: + # Update Pricing Plan + api_instance.update_pricing_plan(plan_id, body=body) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **str**| Pricing Plan ID | + **body** | **SavePricingPlanParam**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_plans_used** +> update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + +Update Used Flag + +Update price plan and feature menu/pricing unit to used. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingPlansApi(api_client) + update_pricing_plans_used_param = saasus_sdk_python.src.pricing.UpdatePricingPlansUsedParam() # UpdatePricingPlansUsedParam | (optional) + + try: + # Update Used Flag + api_instance.update_pricing_plans_used(update_pricing_plans_used_param=update_pricing_plans_used_param) + except Exception as e: + print("Exception when calling PricingPlansApi->update_pricing_plans_used: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_pricing_plans_used_param** | [**UpdatePricingPlansUsedParam**](UpdatePricingPlansUsedParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/PricingTier.md b/docs/pricing/PricingTier.md new file mode 100644 index 0000000..0022a26 --- /dev/null +++ b/docs/pricing/PricingTier.md @@ -0,0 +1,31 @@ +# PricingTier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up_to** | **int** | Upper limit | +**unit_amount** | **int** | Amount per unit | +**flat_amount** | **int** | Fixed amount | +**inf** | **bool** | Indefinite | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTier from a JSON string +pricing_tier_instance = PricingTier.from_json(json) +# print the JSON string representation of the object +print PricingTier.to_json() + +# convert the object into a dict +pricing_tier_dict = pricing_tier_instance.to_dict() +# create an instance of PricingTier from a dict +pricing_tier_form_dict = pricing_tier.from_dict(pricing_tier_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/pricing/PricingTieredUnit.md b/docs/pricing/PricingTieredUnit.md new file mode 100644 index 0000000..c6e2ae9 --- /dev/null +++ b/docs/pricing/PricingTieredUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnit from a JSON string +pricing_tiered_unit_instance = PricingTieredUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnit.to_json() + +# convert the object into a dict +pricing_tiered_unit_dict = pricing_tiered_unit_instance.to_dict() +# create an instance of PricingTieredUnit from a dict +pricing_tiered_unit_form_dict = pricing_tiered_unit.from_dict(pricing_tiered_unit_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/pricing/PricingTieredUnitForSave.md b/docs/pricing/PricingTieredUnitForSave.md new file mode 100644 index 0000000..c620a3a --- /dev/null +++ b/docs/pricing/PricingTieredUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUnitForSave from a JSON string +pricing_tiered_unit_for_save_instance = PricingTieredUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_unit_for_save_dict = pricing_tiered_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUnitForSave from a dict +pricing_tiered_unit_for_save_form_dict = pricing_tiered_unit_for_save.from_dict(pricing_tiered_unit_for_save_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/pricing/PricingTieredUsageUnit.md b/docs/pricing/PricingTieredUsageUnit.md new file mode 100644 index 0000000..de4f0b8 --- /dev/null +++ b/docs/pricing/PricingTieredUsageUnit.md @@ -0,0 +1,40 @@ +# PricingTieredUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | Indicates if the unit is used | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnit from a JSON string +pricing_tiered_usage_unit_instance = PricingTieredUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnit.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_dict = pricing_tiered_usage_unit_instance.to_dict() +# create an instance of PricingTieredUsageUnit from a dict +pricing_tiered_usage_unit_form_dict = pricing_tiered_usage_unit.from_dict(pricing_tiered_usage_unit_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/pricing/PricingTieredUsageUnitForSave.md b/docs/pricing/PricingTieredUsageUnitForSave.md new file mode 100644 index 0000000..7f37702 --- /dev/null +++ b/docs/pricing/PricingTieredUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingTieredUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTieredUsageUnitForSave from a JSON string +pricing_tiered_usage_unit_for_save_instance = PricingTieredUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingTieredUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_tiered_usage_unit_for_save_dict = pricing_tiered_usage_unit_for_save_instance.to_dict() +# create an instance of PricingTieredUsageUnitForSave from a dict +pricing_tiered_usage_unit_for_save_form_dict = pricing_tiered_usage_unit_for_save.from_dict(pricing_tiered_usage_unit_for_save_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/pricing/PricingTiers.md b/docs/pricing/PricingTiers.md new file mode 100644 index 0000000..62b5fea --- /dev/null +++ b/docs/pricing/PricingTiers.md @@ -0,0 +1,28 @@ +# PricingTiers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tiers** | [**List[PricingTier]**](PricingTier.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingTiers from a JSON string +pricing_tiers_instance = PricingTiers.from_json(json) +# print the JSON string representation of the object +print PricingTiers.to_json() + +# convert the object into a dict +pricing_tiers_dict = pricing_tiers_instance.to_dict() +# create an instance of PricingTiers from a dict +pricing_tiers_form_dict = pricing_tiers.from_dict(pricing_tiers_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/pricing/PricingUnit.md b/docs/pricing/PricingUnit.md new file mode 100644 index 0000000..685772c --- /dev/null +++ b/docs/pricing/PricingUnit.md @@ -0,0 +1,41 @@ +# PricingUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnit from a JSON string +pricing_unit_instance = PricingUnit.from_json(json) +# print the JSON string representation of the object +print PricingUnit.to_json() + +# convert the object into a dict +pricing_unit_dict = pricing_unit_instance.to_dict() +# create an instance of PricingUnit from a dict +pricing_unit_form_dict = pricing_unit.from_dict(pricing_unit_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/pricing/PricingUnitBaseProps.md b/docs/pricing/PricingUnitBaseProps.md new file mode 100644 index 0000000..93d2642 --- /dev/null +++ b/docs/pricing/PricingUnitBaseProps.md @@ -0,0 +1,32 @@ +# PricingUnitBaseProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitBaseProps from a JSON string +pricing_unit_base_props_instance = PricingUnitBaseProps.from_json(json) +# print the JSON string representation of the object +print PricingUnitBaseProps.to_json() + +# convert the object into a dict +pricing_unit_base_props_dict = pricing_unit_base_props_instance.to_dict() +# create an instance of PricingUnitBaseProps from a dict +pricing_unit_base_props_form_dict = pricing_unit_base_props.from_dict(pricing_unit_base_props_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/pricing/PricingUnitForSave.md b/docs/pricing/PricingUnitForSave.md new file mode 100644 index 0000000..cfa5d63 --- /dev/null +++ b/docs/pricing/PricingUnitForSave.md @@ -0,0 +1,38 @@ +# PricingUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**tiers** | [**List[PricingTier]**](PricingTier.md) | | +**unit_amount** | **int** | Price | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnitForSave from a JSON string +pricing_unit_for_save_instance = PricingUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUnitForSave.to_json() + +# convert the object into a dict +pricing_unit_for_save_dict = pricing_unit_for_save_instance.to_dict() +# create an instance of PricingUnitForSave from a dict +pricing_unit_for_save_form_dict = pricing_unit_for_save.from_dict(pricing_unit_for_save_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/pricing/PricingUnits.md b/docs/pricing/PricingUnits.md new file mode 100644 index 0000000..20153c6 --- /dev/null +++ b/docs/pricing/PricingUnits.md @@ -0,0 +1,28 @@ +# PricingUnits + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**units** | [**List[PricingUnit]**](PricingUnit.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUnits from a JSON string +pricing_units_instance = PricingUnits.from_json(json) +# print the JSON string representation of the object +print PricingUnits.to_json() + +# convert the object into a dict +pricing_units_dict = pricing_units_instance.to_dict() +# create an instance of PricingUnits from a dict +pricing_units_form_dict = pricing_units.from_dict(pricing_units_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/pricing/PricingUnitsApi.md b/docs/pricing/PricingUnitsApi.md new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/docs/pricing/PricingUnitsApi.md @@ -0,0 +1,397 @@ +# saasus_sdk_python.src.pricing.PricingUnitsApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pricing_unit**](PricingUnitsApi.md#create_pricing_unit) | **POST** /units | Create Pricing Unit +[**delete_pricing_unit**](PricingUnitsApi.md#delete_pricing_unit) | **DELETE** /units/{pricing_unit_id} | Delete Pricing Unit +[**get_pricing_unit**](PricingUnitsApi.md#get_pricing_unit) | **GET** /units/{pricing_unit_id} | Get Pricing Unit +[**get_pricing_units**](PricingUnitsApi.md#get_pricing_units) | **GET** /units | Get Pricing Units +[**update_pricing_unit**](PricingUnitsApi.md#update_pricing_unit) | **PATCH** /units/{pricing_unit_id} | Update Pricing Unit + + +# **create_pricing_unit** +> PricingUnit create_pricing_unit(body=body) + +Create Pricing Unit + +Create a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Create Pricing Unit + api_response = api_instance.create_pricing_unit(body=body) + print("The response of PricingUnitsApi->create_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->create_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_pricing_unit** +> delete_pricing_unit(pricing_unit_id) + +Delete Pricing Unit + +Delete a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Delete Pricing Unit + api_instance.delete_pricing_unit(pricing_unit_id) + except Exception as e: + print("Exception when calling PricingUnitsApi->delete_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_unit** +> PricingUnit get_pricing_unit(pricing_unit_id) + +Get Pricing Unit + +Get a pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + + try: + # Get Pricing Unit + api_response = api_instance.get_pricing_unit(pricing_unit_id) + print("The response of PricingUnitsApi->get_pricing_unit:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + +### Return type + +[**PricingUnit**](PricingUnit.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_pricing_units** +> PricingUnits get_pricing_units() + +Get Pricing Units + +Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + + try: + # Get Pricing Units + api_response = api_instance.get_pricing_units() + print("The response of PricingUnitsApi->get_pricing_units:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PricingUnitsApi->get_pricing_units: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PricingUnits**](PricingUnits.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_pricing_unit** +> update_pricing_unit(pricing_unit_id, body=body) + +Update Pricing Unit + +Update pricing unit. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.PricingUnitsApi(api_client) + pricing_unit_id = 'pricing_unit_id_example' # str | Unit ID + body = saasus_sdk_python.src.pricing.PricingUnitForSave() # PricingUnitForSave | (optional) + + try: + # Update Pricing Unit + api_instance.update_pricing_unit(pricing_unit_id, body=body) + except Exception as e: + print("Exception when calling PricingUnitsApi->update_pricing_unit: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pricing_unit_id** | **str**| Unit ID | + **body** | **PricingUnitForSave**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/PricingUsageUnit.md b/docs/pricing/PricingUsageUnit.md new file mode 100644 index 0000000..edddc9e --- /dev/null +++ b/docs/pricing/PricingUsageUnit.md @@ -0,0 +1,40 @@ +# PricingUsageUnit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**id** | **str** | Universally Unique Identifier | +**metering_unit_id** | **str** | Universally Unique Identifier | +**recurring_interval** | [**RecurringInterval**](RecurringInterval.md) | | +**used** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnit from a JSON string +pricing_usage_unit_instance = PricingUsageUnit.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnit.to_json() + +# convert the object into a dict +pricing_usage_unit_dict = pricing_usage_unit_instance.to_dict() +# create an instance of PricingUsageUnit from a dict +pricing_usage_unit_form_dict = pricing_usage_unit.from_dict(pricing_usage_unit_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/pricing/PricingUsageUnitForSave.md b/docs/pricing/PricingUsageUnitForSave.md new file mode 100644 index 0000000..fb3e5c2 --- /dev/null +++ b/docs/pricing/PricingUsageUnitForSave.md @@ -0,0 +1,36 @@ +# PricingUsageUnitForSave + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name | +**display_name** | **str** | Display Name | +**description** | **str** | Description | +**type** | [**UnitType**](UnitType.md) | | +**currency** | [**Currency**](Currency.md) | | +**upper_count** | **int** | Upper limit | +**unit_amount** | **int** | Amount per usage | +**metering_unit_name** | **str** | Metering unit name | +**aggregate_usage** | [**AggregateUsage**](AggregateUsage.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave + +# TODO update the JSON string below +json = "{}" +# create an instance of PricingUsageUnitForSave from a JSON string +pricing_usage_unit_for_save_instance = PricingUsageUnitForSave.from_json(json) +# print the JSON string representation of the object +print PricingUsageUnitForSave.to_json() + +# convert the object into a dict +pricing_usage_unit_for_save_dict = pricing_usage_unit_for_save_instance.to_dict() +# create an instance of PricingUsageUnitForSave from a dict +pricing_usage_unit_for_save_form_dict = pricing_usage_unit_for_save.from_dict(pricing_usage_unit_for_save_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/pricing/ProrationBehavior.md b/docs/pricing/ProrationBehavior.md new file mode 100644 index 0000000..5c06a64 --- /dev/null +++ b/docs/pricing/ProrationBehavior.md @@ -0,0 +1,11 @@ +# ProrationBehavior + +If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/ProviderName.md b/docs/pricing/ProviderName.md new file mode 100644 index 0000000..b59bd95 --- /dev/null +++ b/docs/pricing/ProviderName.md @@ -0,0 +1,10 @@ +# ProviderName + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/ProviderType.md b/docs/pricing/ProviderType.md new file mode 100644 index 0000000..eedb926 --- /dev/null +++ b/docs/pricing/ProviderType.md @@ -0,0 +1,10 @@ +# ProviderType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/RecaptchaProps.md b/docs/pricing/RecaptchaProps.md new file mode 100644 index 0000000..bb6181a --- /dev/null +++ b/docs/pricing/RecaptchaProps.md @@ -0,0 +1,30 @@ +# RecaptchaProps + +reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**site_key** | **str** | site key | +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps + +# TODO update the JSON string below +json = "{}" +# create an instance of RecaptchaProps from a JSON string +recaptcha_props_instance = RecaptchaProps.from_json(json) +# print the JSON string representation of the object +print RecaptchaProps.to_json() + +# convert the object into a dict +recaptcha_props_dict = recaptcha_props_instance.to_dict() +# create an instance of RecaptchaProps from a dict +recaptcha_props_form_dict = recaptcha_props.from_dict(recaptcha_props_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/pricing/RecurringInterval.md b/docs/pricing/RecurringInterval.md new file mode 100644 index 0000000..62a322c --- /dev/null +++ b/docs/pricing/RecurringInterval.md @@ -0,0 +1,11 @@ +# RecurringInterval + +Cycle month: Monthly year: Yearly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/RequestEmailUpdateParam.md b/docs/pricing/RequestEmailUpdateParam.md new file mode 100644 index 0000000..f55152d --- /dev/null +++ b/docs/pricing/RequestEmailUpdateParam.md @@ -0,0 +1,29 @@ +# RequestEmailUpdateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestEmailUpdateParam from a JSON string +request_email_update_param_instance = RequestEmailUpdateParam.from_json(json) +# print the JSON string representation of the object +print RequestEmailUpdateParam.to_json() + +# convert the object into a dict +request_email_update_param_dict = request_email_update_param_instance.to_dict() +# create an instance of RequestEmailUpdateParam from a dict +request_email_update_param_form_dict = request_email_update_param.from_dict(request_email_update_param_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/pricing/RequestExternalUserLinkParam.md b/docs/pricing/RequestExternalUserLinkParam.md new file mode 100644 index 0000000..eb7ebf2 --- /dev/null +++ b/docs/pricing/RequestExternalUserLinkParam.md @@ -0,0 +1,28 @@ +# RequestExternalUserLinkParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestExternalUserLinkParam from a JSON string +request_external_user_link_param_instance = RequestExternalUserLinkParam.from_json(json) +# print the JSON string representation of the object +print RequestExternalUserLinkParam.to_json() + +# convert the object into a dict +request_external_user_link_param_dict = request_external_user_link_param_instance.to_dict() +# create an instance of RequestExternalUserLinkParam from a dict +request_external_user_link_param_form_dict = request_external_user_link_param.from_dict(request_external_user_link_param_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/pricing/ResendSignUpConfirmationEmailParam.md b/docs/pricing/ResendSignUpConfirmationEmailParam.md new file mode 100644 index 0000000..235d187 --- /dev/null +++ b/docs/pricing/ResendSignUpConfirmationEmailParam.md @@ -0,0 +1,28 @@ +# ResendSignUpConfirmationEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendSignUpConfirmationEmailParam from a JSON string +resend_sign_up_confirmation_email_param_instance = ResendSignUpConfirmationEmailParam.from_json(json) +# print the JSON string representation of the object +print ResendSignUpConfirmationEmailParam.to_json() + +# convert the object into a dict +resend_sign_up_confirmation_email_param_dict = resend_sign_up_confirmation_email_param_instance.to_dict() +# create an instance of ResendSignUpConfirmationEmailParam from a dict +resend_sign_up_confirmation_email_param_form_dict = resend_sign_up_confirmation_email_param.from_dict(resend_sign_up_confirmation_email_param_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/pricing/Role.md b/docs/pricing/Role.md new file mode 100644 index 0000000..71ab0c5 --- /dev/null +++ b/docs/pricing/Role.md @@ -0,0 +1,30 @@ +# Role + +role info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_name** | **str** | role name | +**display_name** | **str** | role display name | + +## Example + +```python +from saasus_sdk_python.src.auth.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print Role.to_json() + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_form_dict = role.from_dict(role_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/pricing/RoleApi.md b/docs/pricing/RoleApi.md new file mode 100644 index 0000000..380b855 --- /dev/null +++ b/docs/pricing/RoleApi.md @@ -0,0 +1,240 @@ +# saasus_sdk_python.src.auth.RoleApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RoleApi.md#create_role) | **POST** /roles | Create Role +[**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{role_name} | Delete Role +[**get_roles**](RoleApi.md#get_roles) | **GET** /roles | Get Roles + + +# **create_role** +> Role create_role(body=body) + +Create Role + +Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + body = saasus_sdk_python.src.auth.Role() # Role | (optional) + + try: + # Create Role + api_response = api_instance.create_role(body=body) + print("The response of RoleApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->create_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Role**| | [optional] + +### Return type + +[**Role**](Role.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_role** +> delete_role(role_name) + +Delete Role + +Delete role. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + role_name = 'admin' # str | Role name + + try: + # Delete Role + api_instance.delete_role(role_name) + except Exception as e: + print("Exception when calling RoleApi->delete_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_roles** +> Roles get_roles() + +Get Roles + +Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.RoleApi(api_client) + + try: + # Get Roles + api_response = api_instance.get_roles() + print("The response of RoleApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleApi->get_roles: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Roles**](Roles.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/Roles.md b/docs/pricing/Roles.md new file mode 100644 index 0000000..760c776 --- /dev/null +++ b/docs/pricing/Roles.md @@ -0,0 +1,28 @@ +# Roles + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print Roles.to_json() + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_form_dict = roles.from_dict(roles_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/pricing/SaasId.md b/docs/pricing/SaasId.md new file mode 100644 index 0000000..ffb5853 --- /dev/null +++ b/docs/pricing/SaasId.md @@ -0,0 +1,30 @@ +# SaasId + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | | +**env_id** | **int** | | +**saas_id** | **str** | SaaS ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_id import SaasId + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasId from a JSON string +saas_id_instance = SaasId.from_json(json) +# print the JSON string representation of the object +print SaasId.to_json() + +# convert the object into a dict +saas_id_dict = saas_id_instance.to_dict() +# create an instance of SaasId from a dict +saas_id_form_dict = saas_id.from_dict(saas_id_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/pricing/SaasUser.md b/docs/pricing/SaasUser.md new file mode 100644 index 0000000..111807b --- /dev/null +++ b/docs/pricing/SaasUser.md @@ -0,0 +1,30 @@ +# SaasUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_user import SaasUser + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUser from a JSON string +saas_user_instance = SaasUser.from_json(json) +# print the JSON string representation of the object +print SaasUser.to_json() + +# convert the object into a dict +saas_user_dict = saas_user_instance.to_dict() +# create an instance of SaasUser from a dict +saas_user_form_dict = saas_user.from_dict(saas_user_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/pricing/SaasUserApi.md b/docs/pricing/SaasUserApi.md new file mode 100644 index 0000000..dc0050d --- /dev/null +++ b/docs/pricing/SaasUserApi.md @@ -0,0 +1,1663 @@ +# saasus_sdk_python.src.auth.SaasUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirm_email_update**](SaasUserApi.md#confirm_email_update) | **POST** /users/{user_id}/email/confirm | Confirm User Email Update +[**confirm_external_user_link**](SaasUserApi.md#confirm_external_user_link) | **POST** /external-users/confirm | Confirm External User Account Link +[**confirm_sign_up_with_aws_marketplace**](SaasUserApi.md#confirm_sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up-confirm | Confirm Sign Up with AWS Marketplace +[**create_saas_user**](SaasUserApi.md#create_saas_user) | **POST** /users | Create SaaS User +[**create_secret_code**](SaasUserApi.md#create_secret_code) | **POST** /users/{user_id}/mfa/software-token/secret-code | Create secret code for authentication application registration +[**delete_saas_user**](SaasUserApi.md#delete_saas_user) | **DELETE** /users/{user_id} | Delete User +[**get_saas_user**](SaasUserApi.md#get_saas_user) | **GET** /users/{user_id} | Get User +[**get_saas_users**](SaasUserApi.md#get_saas_users) | **GET** /users | Get Users +[**get_user_mfa_preference**](SaasUserApi.md#get_user_mfa_preference) | **GET** /users/{user_id}/mfa/preference | Get User's MFA Settings +[**link_aws_marketplace**](SaasUserApi.md#link_aws_marketplace) | **PATCH** /aws-marketplace/link | Link an existing tenant with AWS Marketplace +[**request_email_update**](SaasUserApi.md#request_email_update) | **POST** /users/{user_id}/email/request | Request User Email Update +[**request_external_user_link**](SaasUserApi.md#request_external_user_link) | **POST** /external-users/request | Request External User Account Link +[**resend_sign_up_confirmation_email**](SaasUserApi.md#resend_sign_up_confirmation_email) | **POST** /sign-up/resend | Resend Sign Up Confirmation Email +[**sign_up**](SaasUserApi.md#sign_up) | **POST** /sign-up | Sign Up +[**sign_up_with_aws_marketplace**](SaasUserApi.md#sign_up_with_aws_marketplace) | **POST** /aws-marketplace/sign-up | Sign Up with AWS Marketplace +[**unlink_provider**](SaasUserApi.md#unlink_provider) | **DELETE** /users/{user_id}/providers/{provider_name} | Unlink external identity providers +[**update_saas_user_attributes**](SaasUserApi.md#update_saas_user_attributes) | **PATCH** /users/{user_id}/attributes | Update SaaS User Attributes +[**update_saas_user_email**](SaasUserApi.md#update_saas_user_email) | **PATCH** /users/{user_id}/email | Change Email +[**update_saas_user_password**](SaasUserApi.md#update_saas_user_password) | **PATCH** /users/{user_id}/password | Change Password +[**update_software_token**](SaasUserApi.md#update_software_token) | **PUT** /users/{user_id}/mfa/software-token | Register Authentication Application +[**update_user_mfa_preference**](SaasUserApi.md#update_user_mfa_preference) | **PATCH** /users/{user_id}/mfa/preference | Update User's MFA Settings + + +# **confirm_email_update** +> confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + +Confirm User Email Update + +Verify the code to confirm the user's email address update. Requires the user's access token. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + confirm_email_update_param = saasus_sdk_python.src.auth.ConfirmEmailUpdateParam() # ConfirmEmailUpdateParam | (optional) + + try: + # Confirm User Email Update + api_instance.confirm_email_update(user_id, confirm_email_update_param=confirm_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **confirm_email_update_param** | [**ConfirmEmailUpdateParam**](ConfirmEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_external_user_link** +> confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + +Confirm External User Account Link + +Verify the code for external account user link confirmation. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_external_user_link_param = saasus_sdk_python.src.auth.ConfirmExternalUserLinkParam() # ConfirmExternalUserLinkParam | (optional) + + try: + # Confirm External User Account Link + api_instance.confirm_external_user_link(confirm_external_user_link_param=confirm_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_external_user_link_param** | [**ConfirmExternalUserLinkParam**](ConfirmExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **confirm_sign_up_with_aws_marketplace** +> Tenant confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + +Confirm Sign Up with AWS Marketplace + +Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + confirm_sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.ConfirmSignUpWithAwsMarketplaceParam() # ConfirmSignUpWithAwsMarketplaceParam | (optional) + + try: + # Confirm Sign Up with AWS Marketplace + api_response = api_instance.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param=confirm_sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->confirm_sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->confirm_sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirm_sign_up_with_aws_marketplace_param** | [**ConfirmSignUpWithAwsMarketplaceParam**](ConfirmSignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_saas_user** +> SaasUser create_saas_user(create_saas_user_param=create_saas_user_param) + +Create SaaS User + +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + create_saas_user_param = saasus_sdk_python.src.auth.CreateSaasUserParam() # CreateSaasUserParam | (optional) + + try: + # Create SaaS User + api_response = api_instance.create_saas_user(create_saas_user_param=create_saas_user_param) + print("The response of SaasUserApi->create_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_saas_user_param** | [**CreateSaasUserParam**](CreateSaasUserParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_secret_code** +> SoftwareTokenSecretCode create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + +Create secret code for authentication application registration + +Create a secret code for authentication application registration. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + create_secret_code_param = saasus_sdk_python.src.auth.CreateSecretCodeParam() # CreateSecretCodeParam | (optional) + + try: + # Create secret code for authentication application registration + api_response = api_instance.create_secret_code(user_id, create_secret_code_param=create_secret_code_param) + print("The response of SaasUserApi->create_secret_code:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->create_secret_code: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **create_secret_code_param** | [**CreateSecretCodeParam**](CreateSecretCodeParam.md)| | [optional] + +### Return type + +[**SoftwareTokenSecretCode**](SoftwareTokenSecretCode.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_saas_user** +> delete_saas_user(user_id) + +Delete User + +Delete all users with matching user ID from the tenant and SaaS. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete User + api_instance.delete_saas_user(user_id) + except Exception as e: + print("Exception when calling SaasUserApi->delete_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_user** +> SaasUser get_saas_user(user_id) + +Get User + +Get user information based on user ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User + api_response = api_instance.get_saas_user(user_id) + print("The response of SaasUserApi->get_saas_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_saas_users** +> SaasUsers get_saas_users() + +Get Users + +Get all SaaS users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_saas_users() + print("The response of SaasUserApi->get_saas_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_saas_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SaasUsers**](SaasUsers.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_mfa_preference** +> MfaPreference get_user_mfa_preference(user_id) + +Get User's MFA Settings + +Get the user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User's MFA Settings + api_response = api_instance.get_user_mfa_preference(user_id) + print("The response of SaasUserApi->get_user_mfa_preference:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->get_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**MfaPreference**](MfaPreference.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **link_aws_marketplace** +> link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + +Link an existing tenant with AWS Marketplace + +Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + link_aws_marketplace_param = saasus_sdk_python.src.auth.LinkAwsMarketplaceParam() # LinkAwsMarketplaceParam | (optional) + + try: + # Link an existing tenant with AWS Marketplace + api_instance.link_aws_marketplace(link_aws_marketplace_param=link_aws_marketplace_param) + except Exception as e: + print("Exception when calling SaasUserApi->link_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link_aws_marketplace_param** | [**LinkAwsMarketplaceParam**](LinkAwsMarketplaceParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_email_update** +> request_email_update(user_id, request_email_update_param=request_email_update_param) + +Request User Email Update + +Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + request_email_update_param = saasus_sdk_python.src.auth.RequestEmailUpdateParam() # RequestEmailUpdateParam | (optional) + + try: + # Request User Email Update + api_instance.request_email_update(user_id, request_email_update_param=request_email_update_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_email_update: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **request_email_update_param** | [**RequestEmailUpdateParam**](RequestEmailUpdateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **request_external_user_link** +> request_external_user_link(request_external_user_link_param=request_external_user_link_param) + +Request External User Account Link + +Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + request_external_user_link_param = saasus_sdk_python.src.auth.RequestExternalUserLinkParam() # RequestExternalUserLinkParam | (optional) + + try: + # Request External User Account Link + api_instance.request_external_user_link(request_external_user_link_param=request_external_user_link_param) + except Exception as e: + print("Exception when calling SaasUserApi->request_external_user_link: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_external_user_link_param** | [**RequestExternalUserLinkParam**](RequestExternalUserLinkParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **resend_sign_up_confirmation_email** +> resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + +Resend Sign Up Confirmation Email + +Resend temporary password for the new registered user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + resend_sign_up_confirmation_email_param = saasus_sdk_python.src.auth.ResendSignUpConfirmationEmailParam() # ResendSignUpConfirmationEmailParam | (optional) + + try: + # Resend Sign Up Confirmation Email + api_instance.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param=resend_sign_up_confirmation_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->resend_sign_up_confirmation_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resend_sign_up_confirmation_email_param** | [**ResendSignUpConfirmationEmailParam**](ResendSignUpConfirmationEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up** +> SaasUser sign_up(sign_up_param=sign_up_param) + +Sign Up + +Register a new user. A temporary password will be sent to the registered email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_param = saasus_sdk_python.src.auth.SignUpParam() # SignUpParam | (optional) + + try: + # Sign Up + api_response = api_instance.sign_up(sign_up_param=sign_up_param) + print("The response of SaasUserApi->sign_up:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_param** | [**SignUpParam**](SignUpParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **sign_up_with_aws_marketplace** +> SaasUser sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + +Sign Up with AWS Marketplace + +Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + sign_up_with_aws_marketplace_param = saasus_sdk_python.src.auth.SignUpWithAwsMarketplaceParam() # SignUpWithAwsMarketplaceParam | (optional) + + try: + # Sign Up with AWS Marketplace + api_response = api_instance.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param=sign_up_with_aws_marketplace_param) + print("The response of SaasUserApi->sign_up_with_aws_marketplace:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SaasUserApi->sign_up_with_aws_marketplace: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sign_up_with_aws_marketplace_param** | [**SignUpWithAwsMarketplaceParam**](SignUpWithAwsMarketplaceParam.md)| | [optional] + +### Return type + +[**SaasUser**](SaasUser.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **unlink_provider** +> unlink_provider(provider_name, user_id) + +Unlink external identity providers + +Unlink external identity providers. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + provider_name = 'Google' # str | + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Unlink external identity providers + api_instance.unlink_provider(provider_name, user_id) + except Exception as e: + print("Exception when calling SaasUserApi->unlink_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_name** | **str**| | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_attributes** +> update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + +Update SaaS User Attributes + +Update the additional attributes of the SaaS user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_attributes_param = saasus_sdk_python.src.auth.UpdateSaasUserAttributesParam() # UpdateSaasUserAttributesParam | (optional) + + try: + # Update SaaS User Attributes + api_instance.update_saas_user_attributes(user_id, update_saas_user_attributes_param=update_saas_user_attributes_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_attributes: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_attributes_param** | [**UpdateSaasUserAttributesParam**](UpdateSaasUserAttributesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_email** +> update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + +Change Email + +Change user's email. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_email_param = saasus_sdk_python.src.auth.UpdateSaasUserEmailParam() # UpdateSaasUserEmailParam | (optional) + + try: + # Change Email + api_instance.update_saas_user_email(user_id, update_saas_user_email_param=update_saas_user_email_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_email_param** | [**UpdateSaasUserEmailParam**](UpdateSaasUserEmailParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_saas_user_password** +> update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + +Change Password + +Change user's login password. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_saas_user_password_param = saasus_sdk_python.src.auth.UpdateSaasUserPasswordParam() # UpdateSaasUserPasswordParam | (optional) + + try: + # Change Password + api_instance.update_saas_user_password(user_id, update_saas_user_password_param=update_saas_user_password_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_saas_user_password: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_saas_user_password_param** | [**UpdateSaasUserPasswordParam**](UpdateSaasUserPasswordParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_software_token** +> update_software_token(user_id, update_software_token_param=update_software_token_param) + +Register Authentication Application + +Register an authentication application. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_software_token_param = saasus_sdk_python.src.auth.UpdateSoftwareTokenParam() # UpdateSoftwareTokenParam | (optional) + + try: + # Register Authentication Application + api_instance.update_software_token(user_id, update_software_token_param=update_software_token_param) + except Exception as e: + print("Exception when calling SaasUserApi->update_software_token: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **update_software_token_param** | [**UpdateSoftwareTokenParam**](UpdateSoftwareTokenParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_user_mfa_preference** +> update_user_mfa_preference(user_id, body=body) + +Update User's MFA Settings + +Update user's MFA settings. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SaasUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + body = saasus_sdk_python.src.auth.MfaPreference() # MfaPreference | (optional) + + try: + # Update User's MFA Settings + api_instance.update_user_mfa_preference(user_id, body=body) + except Exception as e: + print("Exception when calling SaasUserApi->update_user_mfa_preference: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + **body** | **MfaPreference**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/SaasUsers.md b/docs/pricing/SaasUsers.md new file mode 100644 index 0000000..d711d83 --- /dev/null +++ b/docs/pricing/SaasUsers.md @@ -0,0 +1,28 @@ +# SaasUsers + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[SaasUser]**](SaasUser.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers + +# TODO update the JSON string below +json = "{}" +# create an instance of SaasUsers from a JSON string +saas_users_instance = SaasUsers.from_json(json) +# print the JSON string representation of the object +print SaasUsers.to_json() + +# convert the object into a dict +saas_users_dict = saas_users_instance.to_dict() +# create an instance of SaasUsers from a dict +saas_users_form_dict = saas_users.from_dict(saas_users_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/pricing/SavePlanParam.md b/docs/pricing/SavePlanParam.md new file mode 100644 index 0000000..6dd92d2 --- /dev/null +++ b/docs/pricing/SavePlanParam.md @@ -0,0 +1,29 @@ +# SavePlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | | +**plan_name** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePlanParam from a JSON string +save_plan_param_instance = SavePlanParam.from_json(json) +# print the JSON string representation of the object +print SavePlanParam.to_json() + +# convert the object into a dict +save_plan_param_dict = save_plan_param_instance.to_dict() +# create an instance of SavePlanParam from a dict +save_plan_param_form_dict = save_plan_param.from_dict(save_plan_param_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/pricing/SavePricingMenuParam.md b/docs/pricing/SavePricingMenuParam.md new file mode 100644 index 0000000..5b75452 --- /dev/null +++ b/docs/pricing/SavePricingMenuParam.md @@ -0,0 +1,31 @@ +# SavePricingMenuParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Menu name | +**display_name** | **str** | Menu display name | +**description** | **str** | Menu description | +**unit_ids** | **List[str]** | Unit IDs to add | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingMenuParam from a JSON string +save_pricing_menu_param_instance = SavePricingMenuParam.from_json(json) +# print the JSON string representation of the object +print SavePricingMenuParam.to_json() + +# convert the object into a dict +save_pricing_menu_param_dict = save_pricing_menu_param_instance.to_dict() +# create an instance of SavePricingMenuParam from a dict +save_pricing_menu_param_form_dict = save_pricing_menu_param.from_dict(save_pricing_menu_param_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/pricing/SavePricingPlanParam.md b/docs/pricing/SavePricingPlanParam.md new file mode 100644 index 0000000..1906a7b --- /dev/null +++ b/docs/pricing/SavePricingPlanParam.md @@ -0,0 +1,31 @@ +# SavePricingPlanParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Pricing plan name | +**display_name** | **str** | Pricing plan display name | +**description** | **str** | Pricing plan description | +**menu_ids** | **List[str]** | Menu ID to be added to the pricing plan | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SavePricingPlanParam from a JSON string +save_pricing_plan_param_instance = SavePricingPlanParam.from_json(json) +# print the JSON string representation of the object +print SavePricingPlanParam.to_json() + +# convert the object into a dict +save_pricing_plan_param_dict = save_pricing_plan_param_instance.to_dict() +# create an instance of SavePricingPlanParam from a dict +save_pricing_plan_param_form_dict = save_pricing_plan_param.from_dict(save_pricing_plan_param_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/pricing/SelfRegist.md b/docs/pricing/SelfRegist.md new file mode 100644 index 0000000..cd67dfa --- /dev/null +++ b/docs/pricing/SelfRegist.md @@ -0,0 +1,29 @@ +# SelfRegist + +self sign-up permission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enable** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfRegist from a JSON string +self_regist_instance = SelfRegist.from_json(json) +# print the JSON string representation of the object +print SelfRegist.to_json() + +# convert the object into a dict +self_regist_dict = self_regist_instance.to_dict() +# create an instance of SelfRegist from a dict +self_regist_form_dict = self_regist.from_dict(self_regist_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/pricing/Settings.md b/docs/pricing/Settings.md new file mode 100644 index 0000000..3b1cae2 --- /dev/null +++ b/docs/pricing/Settings.md @@ -0,0 +1,36 @@ +# Settings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | +**role_arn** | **str** | | +**role_external_id** | **str** | | +**sns_topic_arn** | **str** | | +**cas_bucket_name** | **str** | | +**cas_sns_topic_arn** | **str** | | +**seller_sns_topic_arn** | **str** | | +**redirect_sign_up_page_function_url** | **str** | | +**sqs_arn** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings + +# TODO update the JSON string below +json = "{}" +# create an instance of Settings from a JSON string +settings_instance = Settings.from_json(json) +# print the JSON string representation of the object +print Settings.to_json() + +# convert the object into a dict +settings_dict = settings_instance.to_dict() +# create an instance of Settings from a dict +settings_form_dict = settings.from_dict(settings_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/pricing/SignInSettings.md b/docs/pricing/SignInSettings.md new file mode 100644 index 0000000..e4eb2d3 --- /dev/null +++ b/docs/pricing/SignInSettings.md @@ -0,0 +1,34 @@ +# SignInSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | +**account_verification** | [**AccountVerification**](AccountVerification.md) | | +**self_regist** | [**SelfRegist**](SelfRegist.md) | | +**identity_provider_configuration** | [**IdentityProviderConfiguration**](IdentityProviderConfiguration.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SignInSettings from a JSON string +sign_in_settings_instance = SignInSettings.from_json(json) +# print the JSON string representation of the object +print SignInSettings.to_json() + +# convert the object into a dict +sign_in_settings_dict = sign_in_settings_instance.to_dict() +# create an instance of SignInSettings from a dict +sign_in_settings_form_dict = sign_in_settings.from_dict(sign_in_settings_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/pricing/SignUpParam.md b/docs/pricing/SignUpParam.md new file mode 100644 index 0000000..3e4be52 --- /dev/null +++ b/docs/pricing/SignUpParam.md @@ -0,0 +1,28 @@ +# SignUpParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpParam from a JSON string +sign_up_param_instance = SignUpParam.from_json(json) +# print the JSON string representation of the object +print SignUpParam.to_json() + +# convert the object into a dict +sign_up_param_dict = sign_up_param_instance.to_dict() +# create an instance of SignUpParam from a dict +sign_up_param_form_dict = sign_up_param.from_dict(sign_up_param_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/pricing/SignUpWithAwsMarketplaceParam.md b/docs/pricing/SignUpWithAwsMarketplaceParam.md new file mode 100644 index 0000000..b735360 --- /dev/null +++ b/docs/pricing/SignUpWithAwsMarketplaceParam.md @@ -0,0 +1,29 @@ +# SignUpWithAwsMarketplaceParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email Address | +**registration_token** | **str** | Registration Token | + +## Example + +```python +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam + +# TODO update the JSON string below +json = "{}" +# create an instance of SignUpWithAwsMarketplaceParam from a JSON string +sign_up_with_aws_marketplace_param_instance = SignUpWithAwsMarketplaceParam.from_json(json) +# print the JSON string representation of the object +print SignUpWithAwsMarketplaceParam.to_json() + +# convert the object into a dict +sign_up_with_aws_marketplace_param_dict = sign_up_with_aws_marketplace_param_instance.to_dict() +# create an instance of SignUpWithAwsMarketplaceParam from a dict +sign_up_with_aws_marketplace_param_form_dict = sign_up_with_aws_marketplace_param.from_dict(sign_up_with_aws_marketplace_param_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/pricing/SingleTenantApi.md b/docs/pricing/SingleTenantApi.md new file mode 100644 index 0000000..ecb2008 --- /dev/null +++ b/docs/pricing/SingleTenantApi.md @@ -0,0 +1,234 @@ +# saasus_sdk_python.src.auth.SingleTenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_cloud_formation_launch_stack_link_for_single_tenant**](SingleTenantApi.md#get_cloud_formation_launch_stack_link_for_single_tenant) | **GET** /single-tenant/cloudformation-launch-stack-link | Get CloudFormation Stack Launch Link For Single Tenant +[**get_single_tenant_settings**](SingleTenantApi.md#get_single_tenant_settings) | **GET** /single-tenant/settings | Retrieve the settings of the single tenant. +[**update_single_tenant_settings**](SingleTenantApi.md#update_single_tenant_settings) | **PATCH** /single-tenant/settings | Update configuration information for single-tenant functionality + + +# **get_cloud_formation_launch_stack_link_for_single_tenant** +> CloudFormationLaunchStackLink get_cloud_formation_launch_stack_link_for_single_tenant() + +Get CloudFormation Stack Launch Link For Single Tenant + +Get the CloudFormation stack activation link for Single Tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Get CloudFormation Stack Launch Link For Single Tenant + api_response = api_instance.get_cloud_formation_launch_stack_link_for_single_tenant() + print("The response of SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_cloud_formation_launch_stack_link_for_single_tenant: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CloudFormationLaunchStackLink**](CloudFormationLaunchStackLink.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_single_tenant_settings** +> SingleTenantSettings get_single_tenant_settings() + +Retrieve the settings of the single tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + + try: + # Retrieve the settings of the single tenant. + api_response = api_instance.get_single_tenant_settings() + print("The response of SingleTenantApi->get_single_tenant_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SingleTenantApi->get_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SingleTenantSettings**](SingleTenantSettings.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_single_tenant_settings** +> update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + +Update configuration information for single-tenant functionality + +Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.SingleTenantApi(api_client) + update_single_tenant_settings_param = saasus_sdk_python.src.auth.UpdateSingleTenantSettingsParam() # UpdateSingleTenantSettingsParam | (optional) + + try: + # Update configuration information for single-tenant functionality + api_instance.update_single_tenant_settings(update_single_tenant_settings_param=update_single_tenant_settings_param) + except Exception as e: + print("Exception when calling SingleTenantApi->update_single_tenant_settings: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_single_tenant_settings_param** | [**UpdateSingleTenantSettingsParam**](UpdateSingleTenantSettingsParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/pricing/SingleTenantSettings.md b/docs/pricing/SingleTenantSettings.md new file mode 100644 index 0000000..e3550c7 --- /dev/null +++ b/docs/pricing/SingleTenantSettings.md @@ -0,0 +1,32 @@ +# SingleTenantSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | +**cloudformation_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**ddl_template_url** | **str** | S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored | +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | + +## Example + +```python +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of SingleTenantSettings from a JSON string +single_tenant_settings_instance = SingleTenantSettings.from_json(json) +# print the JSON string representation of the object +print SingleTenantSettings.to_json() + +# convert the object into a dict +single_tenant_settings_dict = single_tenant_settings_instance.to_dict() +# create an instance of SingleTenantSettings from a dict +single_tenant_settings_form_dict = single_tenant_settings.from_dict(single_tenant_settings_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/pricing/SoftwareTokenSecretCode.md b/docs/pricing/SoftwareTokenSecretCode.md new file mode 100644 index 0000000..918def7 --- /dev/null +++ b/docs/pricing/SoftwareTokenSecretCode.md @@ -0,0 +1,28 @@ +# SoftwareTokenSecretCode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_code** | **str** | secret code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode + +# TODO update the JSON string below +json = "{}" +# create an instance of SoftwareTokenSecretCode from a JSON string +software_token_secret_code_instance = SoftwareTokenSecretCode.from_json(json) +# print the JSON string representation of the object +print SoftwareTokenSecretCode.to_json() + +# convert the object into a dict +software_token_secret_code_dict = software_token_secret_code_instance.to_dict() +# create an instance of SoftwareTokenSecretCode from a dict +software_token_secret_code_form_dict = software_token_secret_code.from_dict(software_token_secret_code_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/pricing/StripeApi.md b/docs/pricing/StripeApi.md new file mode 100644 index 0000000..fe60110 --- /dev/null +++ b/docs/pricing/StripeApi.md @@ -0,0 +1,232 @@ +# saasus_sdk_python.src.billing.StripeApi + +All URIs are relative to *https://api.saasus.io/v1/billing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_stripe_info**](StripeApi.md#delete_stripe_info) | **DELETE** /stripe/info | Delete Stripe Connection +[**get_stripe_info**](StripeApi.md#get_stripe_info) | **GET** /stripe/info | Get Stripe Connection information +[**update_stripe_info**](StripeApi.md#update_stripe_info) | **PUT** /stripe/info | Update Stripe Connection Info + + +# **delete_stripe_info** +> delete_stripe_info() + +Delete Stripe Connection + +Delete connection with external billing SaaS + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Delete Stripe Connection + api_instance.delete_stripe_info() + except Exception as e: + print("Exception when calling StripeApi->delete_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_info** +> StripeInfo get_stripe_info() + +Get Stripe Connection information + +Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + + try: + # Get Stripe Connection information + api_response = api_instance.get_stripe_info() + print("The response of StripeApi->get_stripe_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StripeApi->get_stripe_info: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StripeInfo**](StripeInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_stripe_info** +> update_stripe_info(update_stripe_info_param=update_stripe_info_param) + +Update Stripe Connection Info + +Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.billing +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam +from saasus_sdk_python.src.billing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/billing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.billing.Configuration( + host = "https://api.saasus.io/v1/billing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.billing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.billing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.billing.StripeApi(api_client) + update_stripe_info_param = saasus_sdk_python.src.billing.UpdateStripeInfoParam() # UpdateStripeInfoParam | (optional) + + try: + # Update Stripe Connection Info + api_instance.update_stripe_info(update_stripe_info_param=update_stripe_info_param) + except Exception as e: + print("Exception when calling StripeApi->update_stripe_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_stripe_info_param** | [**UpdateStripeInfoParam**](UpdateStripeInfoParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/StripeCustomer.md b/docs/pricing/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/pricing/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_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/pricing/StripeInfo.md b/docs/pricing/StripeInfo.md new file mode 100644 index 0000000..7dc2eb0 --- /dev/null +++ b/docs/pricing/StripeInfo.md @@ -0,0 +1,28 @@ +# StripeInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_registered** | **bool** | | + +## Example + +```python +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeInfo from a JSON string +stripe_info_instance = StripeInfo.from_json(json) +# print the JSON string representation of the object +print StripeInfo.to_json() + +# convert the object into a dict +stripe_info_dict = stripe_info_instance.to_dict() +# create an instance of StripeInfo from a dict +stripe_info_form_dict = stripe_info.from_dict(stripe_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/pricing/TaxRate.md b/docs/pricing/TaxRate.md new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/docs/pricing/TaxRate.md @@ -0,0 +1,34 @@ +# TaxRate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | +**id** | **str** | Universally Unique Identifier | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRate from a JSON string +tax_rate_instance = TaxRate.from_json(json) +# print the JSON string representation of the object +print TaxRate.to_json() + +# convert the object into a dict +tax_rate_dict = tax_rate_instance.to_dict() +# create an instance of TaxRate from a dict +tax_rate_form_dict = tax_rate.from_dict(tax_rate_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/pricing/TaxRateApi.md b/docs/pricing/TaxRateApi.md new file mode 100644 index 0000000..f86066b --- /dev/null +++ b/docs/pricing/TaxRateApi.md @@ -0,0 +1,244 @@ +# saasus_sdk_python.src.pricing.TaxRateApi + +All URIs are relative to *https://api.saasus.io/v1/pricing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tax_rate**](TaxRateApi.md#create_tax_rate) | **POST** /tax-rates | Create Tax Rate +[**get_tax_rates**](TaxRateApi.md#get_tax_rates) | **GET** /tax-rates | Get Tax Rates +[**update_tax_rate**](TaxRateApi.md#update_tax_rate) | **PATCH** /tax-rates/{tax_rate_id} | Update Tax Rate + + +# **create_tax_rate** +> TaxRate create_tax_rate(body=body) + +Create Tax Rate + +Creates a tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + body = saasus_sdk_python.src.pricing.TaxRateProps() # TaxRateProps | (optional) + + try: + # Create Tax Rate + api_response = api_instance.create_tax_rate(body=body) + print("The response of TaxRateApi->create_tax_rate:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->create_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TaxRateProps**| | [optional] + +### Return type + +[**TaxRate**](TaxRate.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tax_rates** +> TaxRates get_tax_rates() + +Get Tax Rates + +Get all Tax Rates + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + + try: + # Get Tax Rates + api_response = api_instance.get_tax_rates() + print("The response of TaxRateApi->get_tax_rates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TaxRateApi->get_tax_rates: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaxRates**](TaxRates.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tax_rate** +> update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + +Update Tax Rate + +Update tax rate. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.pricing +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam +from saasus_sdk_python.src.pricing.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/pricing +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.pricing.Configuration( + host = "https://api.saasus.io/v1/pricing" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.pricing.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.pricing.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.pricing.TaxRateApi(api_client) + tax_rate_id = 'tax_rate_id_example' # str | Tax Rate ID + update_tax_rate_param = saasus_sdk_python.src.pricing.UpdateTaxRateParam() # UpdateTaxRateParam | (optional) + + try: + # Update Tax Rate + api_instance.update_tax_rate(tax_rate_id, update_tax_rate_param=update_tax_rate_param) + except Exception as e: + print("Exception when calling TaxRateApi->update_tax_rate: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tax_rate_id** | **str**| Tax Rate ID | + **update_tax_rate_param** | [**UpdateTaxRateParam**](UpdateTaxRateParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**500** | Internal Server Error | - | + +[[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/pricing/TaxRateProps.md b/docs/pricing/TaxRateProps.md new file mode 100644 index 0000000..a51b328 --- /dev/null +++ b/docs/pricing/TaxRateProps.md @@ -0,0 +1,33 @@ +# TaxRateProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tax rate | +**display_name** | **str** | Display name | +**percentage** | **float** | Percentage | +**inclusive** | **bool** | Inclusive or not | +**country** | **str** | Country code of ISO 3166-1 alpha-2 | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRateProps from a JSON string +tax_rate_props_instance = TaxRateProps.from_json(json) +# print the JSON string representation of the object +print TaxRateProps.to_json() + +# convert the object into a dict +tax_rate_props_dict = tax_rate_props_instance.to_dict() +# create an instance of TaxRateProps from a dict +tax_rate_props_form_dict = tax_rate_props.from_dict(tax_rate_props_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/pricing/TaxRates.md b/docs/pricing/TaxRates.md new file mode 100644 index 0000000..1442cdb --- /dev/null +++ b/docs/pricing/TaxRates.md @@ -0,0 +1,28 @@ +# TaxRates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tax_rates** | [**List[TaxRate]**](TaxRate.md) | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxRates from a JSON string +tax_rates_instance = TaxRates.from_json(json) +# print the JSON string representation of the object +print TaxRates.to_json() + +# convert the object into a dict +tax_rates_dict = tax_rates_instance.to_dict() +# create an instance of TaxRates from a dict +tax_rates_form_dict = tax_rates.from_dict(tax_rates_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/pricing/Tenant.md b/docs/pricing/Tenant.md new file mode 100644 index 0000000..f71030d --- /dev/null +++ b/docs/pricing/Tenant.md @@ -0,0 +1,39 @@ +# Tenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant import Tenant + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenant from a JSON string +tenant_instance = Tenant.from_json(json) +# print the JSON string representation of the object +print Tenant.to_json() + +# convert the object into a dict +tenant_dict = tenant_instance.to_dict() +# create an instance of Tenant from a dict +tenant_form_dict = tenant.from_dict(tenant_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/pricing/TenantApi.md b/docs/pricing/TenantApi.md new file mode 100644 index 0000000..595291e --- /dev/null +++ b/docs/pricing/TenantApi.md @@ -0,0 +1,1014 @@ +# saasus_sdk_python.src.auth.TenantApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant**](TenantApi.md#create_tenant) | **POST** /tenants | Create Tenant +[**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting +[**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe +[**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer +[**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details +[**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant +[**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants +[**reset_plan**](TenantApi.md#reset_plan) | **PUT** /plans/reset | Delete all information related to rate plans +[**update_tenant**](TenantApi.md#update_tenant) | **PATCH** /tenants/{tenant_id} | Update Tenant Details +[**update_tenant_billing_info**](TenantApi.md#update_tenant_billing_info) | **PUT** /tenants/{tenant_id}/billing-info | Update Tenant Billing Information +[**update_tenant_identity_provider**](TenantApi.md#update_tenant_identity_provider) | **PUT** /tenants/{tenant_id}/identity-providers | Update identity provider per tenant +[**update_tenant_plan**](TenantApi.md#update_tenant_plan) | **PUT** /tenants/{tenant_id}/plans | Update Tenant Plan Information + + +# **create_tenant** +> Tenant create_tenant(body=body) + +Create Tenant + +Create a tenant managed by the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Create Tenant + api_response = api_instance.create_tenant(body=body) + print("The response of TenantApi->create_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->create_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **TenantProps**| | [optional] + +### Return type + +[**Tenant**](Tenant.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_and_pricing** +> create_tenant_and_pricing() + +Stripe Initial Setting + +Set Stripe initial information via billing + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Stripe Initial Setting + api_instance.create_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->create_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_stripe_tenant_and_pricing** +> delete_stripe_tenant_and_pricing() + +Delete Customer and Product From Stripe + +Delete customer and product from Stripe. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete Customer and Product From Stripe + api_instance.delete_stripe_tenant_and_pricing() + except Exception as e: + print("Exception when calling TenantApi->delete_stripe_tenant_and_pricing: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant** +> delete_tenant(tenant_id) + +Delete Tenant + +Delete SaaSus Platform tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Delete Tenant + api_instance.delete_tenant(tenant_id) + except Exception as e: + print("Exception when calling TenantApi->delete_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant** +> TenantDetail get_tenant(tenant_id) + +Get Tenant Details + +Get the details of tenant managed on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Details + api_response = api_instance.get_tenant(tenant_id) + print("The response of TenantApi->get_tenant:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantDetail**](TenantDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_identity_providers** +> TenantIdentityProviders get_tenant_identity_providers(tenant_id) + +Get identity provider per tenant + +Get sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get identity provider per tenant + api_response = api_instance.get_tenant_identity_providers(tenant_id) + print("The response of TenantApi->get_tenant_identity_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenant_identity_providers: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**TenantIdentityProviders**](TenantIdentityProviders.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenants** +> Tenants get_tenants() + +Get Tenants + +Get tenants managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Get Tenants + api_response = api_instance.get_tenants() + print("The response of TenantApi->get_tenants:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_tenants: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Tenants**](Tenants.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **reset_plan** +> reset_plan() + +Delete all information related to rate plans + +Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + + try: + # Delete all information related to rate plans + api_instance.reset_plan() + except Exception as e: + print("Exception when calling TenantApi->reset_plan: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant** +> update_tenant(tenant_id, body=body) + +Update Tenant Details + +Update SaaSus Platform tenant details. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.TenantProps() # TenantProps | (optional) + + try: + # Update Tenant Details + api_instance.update_tenant(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **TenantProps**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_billing_info** +> update_tenant_billing_info(tenant_id, body=body) + +Update Tenant Billing Information + +Update SaaSus Platform tenant billing information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.BillingInfo() # BillingInfo | (optional) + + try: + # Update Tenant Billing Information + api_instance.update_tenant_billing_info(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_billing_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **BillingInfo**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_identity_provider** +> update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + +Update identity provider per tenant + +Update sign-in information via external identity provider per tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + update_tenant_identity_provider_param = saasus_sdk_python.src.auth.UpdateTenantIdentityProviderParam() # UpdateTenantIdentityProviderParam | (optional) + + try: + # Update identity provider per tenant + api_instance.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param=update_tenant_identity_provider_param) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_identity_provider: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **update_tenant_identity_provider_param** | [**UpdateTenantIdentityProviderParam**](UpdateTenantIdentityProviderParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_plan** +> update_tenant_plan(tenant_id, body=body) + +Update Tenant Plan Information + +Update SaaSus Platform tenant plan information. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + body = saasus_sdk_python.src.auth.PlanReservation() # PlanReservation | (optional) + + try: + # Update Tenant Plan Information + api_instance.update_tenant_plan(tenant_id, body=body) + except Exception as e: + print("Exception when calling TenantApi->update_tenant_plan: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **body** | **PlanReservation**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/TenantAttributeApi.md b/docs/pricing/TenantAttributeApi.md new file mode 100644 index 0000000..edbede9 --- /dev/null +++ b/docs/pricing/TenantAttributeApi.md @@ -0,0 +1,239 @@ +# saasus_sdk_python.src.auth.TenantAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_attribute**](TenantAttributeApi.md#create_tenant_attribute) | **POST** /tenant-attributes | Create Tenant Attribute +[**delete_tenant_attribute**](TenantAttributeApi.md#delete_tenant_attribute) | **DELETE** /tenant-attributes/{attribute_name} | Delete Tenant Attribute +[**get_tenant_attributes**](TenantAttributeApi.md#get_tenant_attributes) | **GET** /tenant-attributes | Get Tenant Attributes + + +# **create_tenant_attribute** +> Attribute create_tenant_attribute(body=body) + +Create Tenant Attribute + +Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create Tenant Attribute + api_response = api_instance.create_tenant_attribute(body=body) + print("The response of TenantAttributeApi->create_tenant_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->create_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_attribute** +> delete_tenant_attribute(attribute_name) + +Delete Tenant Attribute + +Deletes tenant attributes managed by SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete Tenant Attribute + api_instance.delete_tenant_attribute(attribute_name) + except Exception as e: + print("Exception when calling TenantAttributeApi->delete_tenant_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_attributes** +> TenantAttributes get_tenant_attributes() + +Get Tenant Attributes + +Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantAttributeApi(api_client) + + try: + # Get Tenant Attributes + api_response = api_instance.get_tenant_attributes() + print("The response of TenantAttributeApi->get_tenant_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantAttributeApi->get_tenant_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TenantAttributes**](TenantAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/TenantAttributes.md b/docs/pricing/TenantAttributes.md new file mode 100644 index 0000000..4edc2ba --- /dev/null +++ b/docs/pricing/TenantAttributes.md @@ -0,0 +1,28 @@ +# TenantAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_attributes** | [**List[Attribute]**](Attribute.md) | Tenant Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantAttributes from a JSON string +tenant_attributes_instance = TenantAttributes.from_json(json) +# print the JSON string representation of the object +print TenantAttributes.to_json() + +# convert the object into a dict +tenant_attributes_dict = tenant_attributes_instance.to_dict() +# create an instance of TenantAttributes from a dict +tenant_attributes_form_dict = tenant_attributes.from_dict(tenant_attributes_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/pricing/TenantDetail.md b/docs/pricing/TenantDetail.md new file mode 100644 index 0000000..59ee38e --- /dev/null +++ b/docs/pricing/TenantDetail.md @@ -0,0 +1,41 @@ +# TenantDetail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**plan_id** | **str** | | [optional] +**billing_info** | [**BillingInfo**](BillingInfo.md) | | [optional] +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | +**next_plan_id** | **str** | | [optional] +**using_next_plan_from** | **int** | Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) | [optional] +**next_plan_tax_rate_id** | **str** | | [optional] +**proration_behavior** | [**ProrationBehavior**](ProrationBehavior.md) | | [optional] +**delete_usage** | **bool** | If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. | [optional] +**plan_histories** | [**List[PlanHistory]**](PlanHistory.md) | Plan History | +**current_plan_period_start** | **int** | current plan period start | [optional] +**current_plan_period_end** | **int** | current plan period end | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantDetail from a JSON string +tenant_detail_instance = TenantDetail.from_json(json) +# print the JSON string representation of the object +print TenantDetail.to_json() + +# convert the object into a dict +tenant_detail_dict = tenant_detail_instance.to_dict() +# create an instance of TenantDetail from a dict +tenant_detail_form_dict = tenant_detail.from_dict(tenant_detail_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/pricing/TenantIdentityProviderProps.md b/docs/pricing/TenantIdentityProviderProps.md new file mode 100644 index 0000000..e416216 --- /dev/null +++ b/docs/pricing/TenantIdentityProviderProps.md @@ -0,0 +1,29 @@ +# TenantIdentityProviderProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviderProps from a JSON string +tenant_identity_provider_props_instance = TenantIdentityProviderProps.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviderProps.to_json() + +# convert the object into a dict +tenant_identity_provider_props_dict = tenant_identity_provider_props_instance.to_dict() +# create an instance of TenantIdentityProviderProps from a dict +tenant_identity_provider_props_form_dict = tenant_identity_provider_props.from_dict(tenant_identity_provider_props_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/pricing/TenantIdentityProviders.md b/docs/pricing/TenantIdentityProviders.md new file mode 100644 index 0000000..f659496 --- /dev/null +++ b/docs/pricing/TenantIdentityProviders.md @@ -0,0 +1,28 @@ +# TenantIdentityProviders + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**saml** | [**TenantIdentityProvidersSaml**](TenantIdentityProvidersSaml.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProviders from a JSON string +tenant_identity_providers_instance = TenantIdentityProviders.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProviders.to_json() + +# convert the object into a dict +tenant_identity_providers_dict = tenant_identity_providers_instance.to_dict() +# create an instance of TenantIdentityProviders from a dict +tenant_identity_providers_form_dict = tenant_identity_providers.from_dict(tenant_identity_providers_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/pricing/TenantIdentityProvidersSaml.md b/docs/pricing/TenantIdentityProvidersSaml.md new file mode 100644 index 0000000..2daf066 --- /dev/null +++ b/docs/pricing/TenantIdentityProvidersSaml.md @@ -0,0 +1,30 @@ +# TenantIdentityProvidersSaml + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata_url** | **str** | | +**email_attribute** | **str** | | +**sign_in_url** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantIdentityProvidersSaml from a JSON string +tenant_identity_providers_saml_instance = TenantIdentityProvidersSaml.from_json(json) +# print the JSON string representation of the object +print TenantIdentityProvidersSaml.to_json() + +# convert the object into a dict +tenant_identity_providers_saml_dict = tenant_identity_providers_saml_instance.to_dict() +# create an instance of TenantIdentityProvidersSaml from a dict +tenant_identity_providers_saml_form_dict = tenant_identity_providers_saml.from_dict(tenant_identity_providers_saml_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/pricing/TenantProps.md b/docs/pricing/TenantProps.md new file mode 100644 index 0000000..f988525 --- /dev/null +++ b/docs/pricing/TenantProps.md @@ -0,0 +1,30 @@ +# TenantProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | tenant name | +**attributes** | **Dict[str, object]** | attribute info | +**back_office_staff_email** | **str** | administrative staff email address | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps + +# TODO update the JSON string below +json = "{}" +# create an instance of TenantProps from a JSON string +tenant_props_instance = TenantProps.from_json(json) +# print the JSON string representation of the object +print TenantProps.to_json() + +# convert the object into a dict +tenant_props_dict = tenant_props_instance.to_dict() +# create an instance of TenantProps from a dict +tenant_props_form_dict = tenant_props.from_dict(tenant_props_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/pricing/TenantUserApi.md b/docs/pricing/TenantUserApi.md new file mode 100644 index 0000000..b6fc617 --- /dev/null +++ b/docs/pricing/TenantUserApi.md @@ -0,0 +1,733 @@ +# saasus_sdk_python.src.auth.TenantUserApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tenant_user**](TenantUserApi.md#create_tenant_user) | **POST** /tenants/{tenant_id}/users | Create Tenant User +[**create_tenant_user_roles**](TenantUserApi.md#create_tenant_user_roles) | **POST** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles | Create Tenant User Role +[**delete_tenant_user**](TenantUserApi.md#delete_tenant_user) | **DELETE** /tenants/{tenant_id}/users/{user_id} | Delete Tenant User +[**delete_tenant_user_role**](TenantUserApi.md#delete_tenant_user_role) | **DELETE** /tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name} | Remove Role From Tenant User +[**get_all_tenant_user**](TenantUserApi.md#get_all_tenant_user) | **GET** /tenants/all/users/{user_id} | Get User Info +[**get_all_tenant_users**](TenantUserApi.md#get_all_tenant_users) | **GET** /tenants/all/users | Get Users +[**get_tenant_user**](TenantUserApi.md#get_tenant_user) | **GET** /tenants/{tenant_id}/users/{user_id} | Get Tenant User +[**get_tenant_users**](TenantUserApi.md#get_tenant_users) | **GET** /tenants/{tenant_id}/users | Get Tenant Users +[**update_tenant_user**](TenantUserApi.md#update_tenant_user) | **PATCH** /tenants/{tenant_id}/users/{user_id} | Update Tenant User Attribute + + +# **create_tenant_user** +> User create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + +Create Tenant User + +Create a tenant user. If attributes is empty, the additional attributes will be created empty. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + create_tenant_user_param = saasus_sdk_python.src.auth.CreateTenantUserParam() # CreateTenantUserParam | (optional) + + try: + # Create Tenant User + api_response = api_instance.create_tenant_user(tenant_id, create_tenant_user_param=create_tenant_user_param) + print("The response of TenantUserApi->create_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **create_tenant_user_param** | [**CreateTenantUserParam**](CreateTenantUserParam.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_tenant_user_roles** +> create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + +Create Tenant User Role + +Create roles on tenant users. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + create_tenant_user_roles_param = saasus_sdk_python.src.auth.CreateTenantUserRolesParam() # CreateTenantUserRolesParam | (optional) + + try: + # Create Tenant User Role + api_instance.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param=create_tenant_user_roles_param) + except Exception as e: + print("Exception when calling TenantUserApi->create_tenant_user_roles: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **create_tenant_user_roles_param** | [**CreateTenantUserRolesParam**](CreateTenantUserRolesParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user** +> delete_tenant_user(tenant_id, user_id) + +Delete Tenant User + +Delete a user from the tenant. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Delete Tenant User + api_instance.delete_tenant_user(tenant_id, user_id) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_tenant_user_role** +> delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + +Remove Role From Tenant User + +Remove a role from a tenant user. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + env_id = 56 # int | Env ID + role_name = 'admin' # str | Role name + + try: + # Remove Role From Tenant User + api_instance.delete_tenant_user_role(tenant_id, user_id, env_id, role_name) + except Exception as e: + print("Exception when calling TenantUserApi->delete_tenant_user_role: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **env_id** | **int**| Env ID | + **role_name** | **str**| Role name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_user** +> Users get_all_tenant_user(user_id) + +Get User Info + +Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get User Info + api_response = api_instance.get_all_tenant_user(user_id) + print("The response of TenantUserApi->get_all_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_all_tenant_users** +> Users get_all_tenant_users() + +Get Users + +Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + + try: + # Get Users + api_response = api_instance.get_all_tenant_users() + print("The response of TenantUserApi->get_all_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_all_tenant_users: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_user** +> User get_tenant_user(tenant_id, user_id) + +Get Tenant User + +Get one tenant user by specific ID. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + + try: + # Get Tenant User + api_response = api_instance.get_tenant_user(tenant_id, user_id) + print("The response of TenantUserApi->get_tenant_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + +### Return type + +[**User**](User.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_tenant_users** +> Users get_tenant_users(tenant_id) + +Get Tenant Users + +Get all the users belonging to the tenant. Id is unique. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Tenant Users + api_response = api_instance.get_tenant_users(tenant_id) + print("The response of TenantUserApi->get_tenant_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantUserApi->get_tenant_users: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**Users**](Users.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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) + +# **update_tenant_user** +> update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + +Update Tenant User Attribute + +Update tenant user attributes. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantUserApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + user_id = 'f94bfffc-8be2-11ec-b41a-0242ac120004' # str | User ID + update_tenant_user_param = saasus_sdk_python.src.auth.UpdateTenantUserParam() # UpdateTenantUserParam | (optional) + + try: + # Update Tenant User Attribute + api_instance.update_tenant_user(tenant_id, user_id, update_tenant_user_param=update_tenant_user_param) + except Exception as e: + print("Exception when calling TenantUserApi->update_tenant_user: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + **user_id** | **str**| User ID | + **update_tenant_user_param** | [**UpdateTenantUserParam**](UpdateTenantUserParam.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/Tenants.md b/docs/pricing/Tenants.md new file mode 100644 index 0000000..bebe635 --- /dev/null +++ b/docs/pricing/Tenants.md @@ -0,0 +1,29 @@ +# Tenants + +Tenant Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenants** | [**List[Tenant]**](Tenant.md) | | + +## Example + +```python +from saasus_sdk_python.src.auth.models.tenants import Tenants + +# TODO update the JSON string below +json = "{}" +# create an instance of Tenants from a JSON string +tenants_instance = Tenants.from_json(json) +# print the JSON string representation of the object +print Tenants.to_json() + +# convert the object into a dict +tenants_dict = tenants_instance.to_dict() +# create an instance of Tenants from a dict +tenants_form_dict = tenants.from_dict(tenants_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/pricing/UnitType.md b/docs/pricing/UnitType.md new file mode 100644 index 0000000..587af56 --- /dev/null +++ b/docs/pricing/UnitType.md @@ -0,0 +1,11 @@ +# UnitType + +Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/UpdateBasicInfoParam.md b/docs/pricing/UpdateBasicInfoParam.md new file mode 100644 index 0000000..394f257 --- /dev/null +++ b/docs/pricing/UpdateBasicInfoParam.md @@ -0,0 +1,30 @@ +# UpdateBasicInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | Domain Name | +**from_email_address** | **str** | Sender email of authentication email | +**reply_email_address** | **str** | Reply-from email address of authentication email | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBasicInfoParam from a JSON string +update_basic_info_param_instance = UpdateBasicInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateBasicInfoParam.to_json() + +# convert the object into a dict +update_basic_info_param_dict = update_basic_info_param_instance.to_dict() +# create an instance of UpdateBasicInfoParam from a dict +update_basic_info_param_form_dict = update_basic_info_param.from_dict(update_basic_info_param_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/pricing/UpdateCustomizePageSettingsParam.md b/docs/pricing/UpdateCustomizePageSettingsParam.md new file mode 100644 index 0000000..7b63182 --- /dev/null +++ b/docs/pricing/UpdateCustomizePageSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateCustomizePageSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | service name | +**terms_of_service_url** | **str** | terms of service URL | +**privacy_policy_url** | **str** | privacy policy URL | +**google_tag_manager_container_id** | **str** | Google Tag Manager container ID | +**icon** | **str** | service icon | +**favicon** | **str** | favicon | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePageSettingsParam from a JSON string +update_customize_page_settings_param_instance = UpdateCustomizePageSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePageSettingsParam.to_json() + +# convert the object into a dict +update_customize_page_settings_param_dict = update_customize_page_settings_param_instance.to_dict() +# create an instance of UpdateCustomizePageSettingsParam from a dict +update_customize_page_settings_param_form_dict = update_customize_page_settings_param.from_dict(update_customize_page_settings_param_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/pricing/UpdateCustomizePagesParam.md b/docs/pricing/UpdateCustomizePagesParam.md new file mode 100644 index 0000000..23d63e1 --- /dev/null +++ b/docs/pricing/UpdateCustomizePagesParam.md @@ -0,0 +1,30 @@ +# UpdateCustomizePagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**sign_in_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] +**password_reset_page** | [**CustomizePageProps**](CustomizePageProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomizePagesParam from a JSON string +update_customize_pages_param_instance = UpdateCustomizePagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateCustomizePagesParam.to_json() + +# convert the object into a dict +update_customize_pages_param_dict = update_customize_pages_param_instance.to_dict() +# create an instance of UpdateCustomizePagesParam from a dict +update_customize_pages_param_form_dict = update_customize_pages_param.from_dict(update_customize_pages_param_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/pricing/UpdateEnvParam.md b/docs/pricing/UpdateEnvParam.md new file mode 100644 index 0000000..7b13116 --- /dev/null +++ b/docs/pricing/UpdateEnvParam.md @@ -0,0 +1,29 @@ +# UpdateEnvParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateEnvParam from a JSON string +update_env_param_instance = UpdateEnvParam.from_json(json) +# print the JSON string representation of the object +print UpdateEnvParam.to_json() + +# convert the object into a dict +update_env_param_dict = update_env_param_instance.to_dict() +# create an instance of UpdateEnvParam from a dict +update_env_param_form_dict = update_env_param.from_dict(update_env_param_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/pricing/UpdateFeedbackCommentParam.md b/docs/pricing/UpdateFeedbackCommentParam.md new file mode 100644 index 0000000..238f913 --- /dev/null +++ b/docs/pricing/UpdateFeedbackCommentParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackCommentParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackCommentParam from a JSON string +update_feedback_comment_param_instance = UpdateFeedbackCommentParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackCommentParam.to_json() + +# convert the object into a dict +update_feedback_comment_param_dict = update_feedback_comment_param_instance.to_dict() +# create an instance of UpdateFeedbackCommentParam from a dict +update_feedback_comment_param_form_dict = update_feedback_comment_param.from_dict(update_feedback_comment_param_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/pricing/UpdateFeedbackParam.md b/docs/pricing/UpdateFeedbackParam.md new file mode 100644 index 0000000..0355b89 --- /dev/null +++ b/docs/pricing/UpdateFeedbackParam.md @@ -0,0 +1,29 @@ +# UpdateFeedbackParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feedback_title** | **str** | | +**feedback_description** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackParam from a JSON string +update_feedback_param_instance = UpdateFeedbackParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackParam.to_json() + +# convert the object into a dict +update_feedback_param_dict = update_feedback_param_instance.to_dict() +# create an instance of UpdateFeedbackParam from a dict +update_feedback_param_form_dict = update_feedback_param.from_dict(update_feedback_param_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/pricing/UpdateFeedbackStatusParam.md b/docs/pricing/UpdateFeedbackStatusParam.md new file mode 100644 index 0000000..4d46834 --- /dev/null +++ b/docs/pricing/UpdateFeedbackStatusParam.md @@ -0,0 +1,28 @@ +# UpdateFeedbackStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFeedbackStatusParam from a JSON string +update_feedback_status_param_instance = UpdateFeedbackStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateFeedbackStatusParam.to_json() + +# convert the object into a dict +update_feedback_status_param_dict = update_feedback_status_param_instance.to_dict() +# create an instance of UpdateFeedbackStatusParam from a dict +update_feedback_status_param_form_dict = update_feedback_status_param.from_dict(update_feedback_status_param_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/pricing/UpdateIdentityProviderParam.md b/docs/pricing/UpdateIdentityProviderParam.md new file mode 100644 index 0000000..fb9af15 --- /dev/null +++ b/docs/pricing/UpdateIdentityProviderParam.md @@ -0,0 +1,29 @@ +# UpdateIdentityProviderParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | [**ProviderName**](ProviderName.md) | | +**identity_provider_props** | [**IdentityProviderProps**](IdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdentityProviderParam from a JSON string +update_identity_provider_param_instance = UpdateIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateIdentityProviderParam.to_json() + +# convert the object into a dict +update_identity_provider_param_dict = update_identity_provider_param_instance.to_dict() +# create an instance of UpdateIdentityProviderParam from a dict +update_identity_provider_param_form_dict = update_identity_provider_param.from_dict(update_identity_provider_param_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/pricing/UpdateListingStatusParam.md b/docs/pricing/UpdateListingStatusParam.md new file mode 100644 index 0000000..bdef343 --- /dev/null +++ b/docs/pricing/UpdateListingStatusParam.md @@ -0,0 +1,28 @@ +# UpdateListingStatusParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listing_status** | [**ListingStatus**](ListingStatus.md) | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateListingStatusParam from a JSON string +update_listing_status_param_instance = UpdateListingStatusParam.from_json(json) +# print the JSON string representation of the object +print UpdateListingStatusParam.to_json() + +# convert the object into a dict +update_listing_status_param_dict = update_listing_status_param_instance.to_dict() +# create an instance of UpdateListingStatusParam from a dict +update_listing_status_param_form_dict = update_listing_status_param.from_dict(update_listing_status_param_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/pricing/UpdateMeteringUnitTimestampCountMethod.md b/docs/pricing/UpdateMeteringUnitTimestampCountMethod.md new file mode 100644 index 0000000..10c059f --- /dev/null +++ b/docs/pricing/UpdateMeteringUnitTimestampCountMethod.md @@ -0,0 +1,11 @@ +# UpdateMeteringUnitTimestampCountMethod + +Update method add: Addition sub: Subtraction direct: Overwrite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/UpdateMeteringUnitTimestampCountNowParam.md b/docs/pricing/UpdateMeteringUnitTimestampCountNowParam.md new file mode 100644 index 0000000..299f8a4 --- /dev/null +++ b/docs/pricing/UpdateMeteringUnitTimestampCountNowParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountNowParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string +update_metering_unit_timestamp_count_now_param_instance = UpdateMeteringUnitTimestampCountNowParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountNowParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_now_param_dict = update_metering_unit_timestamp_count_now_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict +update_metering_unit_timestamp_count_now_param_form_dict = update_metering_unit_timestamp_count_now_param.from_dict(update_metering_unit_timestamp_count_now_param_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/pricing/UpdateMeteringUnitTimestampCountParam.md b/docs/pricing/UpdateMeteringUnitTimestampCountParam.md new file mode 100644 index 0000000..3c2be0f --- /dev/null +++ b/docs/pricing/UpdateMeteringUnitTimestampCountParam.md @@ -0,0 +1,29 @@ +# UpdateMeteringUnitTimestampCountParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**method** | [**UpdateMeteringUnitTimestampCountMethod**](UpdateMeteringUnitTimestampCountMethod.md) | | +**count** | **int** | Count | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string +update_metering_unit_timestamp_count_param_instance = UpdateMeteringUnitTimestampCountParam.from_json(json) +# print the JSON string representation of the object +print UpdateMeteringUnitTimestampCountParam.to_json() + +# convert the object into a dict +update_metering_unit_timestamp_count_param_dict = update_metering_unit_timestamp_count_param_instance.to_dict() +# create an instance of UpdateMeteringUnitTimestampCountParam from a dict +update_metering_unit_timestamp_count_param_form_dict = update_metering_unit_timestamp_count_param.from_dict(update_metering_unit_timestamp_count_param_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/pricing/UpdateNotificationMessagesParam.md b/docs/pricing/UpdateNotificationMessagesParam.md new file mode 100644 index 0000000..d59b0ec --- /dev/null +++ b/docs/pricing/UpdateNotificationMessagesParam.md @@ -0,0 +1,36 @@ +# UpdateNotificationMessagesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sign_up** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**create_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**resend_code** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**forgot_password** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**update_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_user_attribute** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**authentication_mfa** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**invite_tenant_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] +**verify_external_user** | [**MessageTemplate**](MessageTemplate.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNotificationMessagesParam from a JSON string +update_notification_messages_param_instance = UpdateNotificationMessagesParam.from_json(json) +# print the JSON string representation of the object +print UpdateNotificationMessagesParam.to_json() + +# convert the object into a dict +update_notification_messages_param_dict = update_notification_messages_param_instance.to_dict() +# create an instance of UpdateNotificationMessagesParam from a dict +update_notification_messages_param_form_dict = update_notification_messages_param.from_dict(update_notification_messages_param_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/pricing/UpdatePricingPlansUsedParam.md b/docs/pricing/UpdatePricingPlansUsedParam.md new file mode 100644 index 0000000..b59918d --- /dev/null +++ b/docs/pricing/UpdatePricingPlansUsedParam.md @@ -0,0 +1,28 @@ +# UpdatePricingPlansUsedParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_ids** | **List[str]** | | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePricingPlansUsedParam from a JSON string +update_pricing_plans_used_param_instance = UpdatePricingPlansUsedParam.from_json(json) +# print the JSON string representation of the object +print UpdatePricingPlansUsedParam.to_json() + +# convert the object into a dict +update_pricing_plans_used_param_dict = update_pricing_plans_used_param_instance.to_dict() +# create an instance of UpdatePricingPlansUsedParam from a dict +update_pricing_plans_used_param_form_dict = update_pricing_plans_used_param.from_dict(update_pricing_plans_used_param_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/pricing/UpdateSaasUserAttributesParam.md b/docs/pricing/UpdateSaasUserAttributesParam.md new file mode 100644 index 0000000..1df45c5 --- /dev/null +++ b/docs/pricing/UpdateSaasUserAttributesParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserAttributesParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserAttributesParam from a JSON string +update_saas_user_attributes_param_instance = UpdateSaasUserAttributesParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserAttributesParam.to_json() + +# convert the object into a dict +update_saas_user_attributes_param_dict = update_saas_user_attributes_param_instance.to_dict() +# create an instance of UpdateSaasUserAttributesParam from a dict +update_saas_user_attributes_param_form_dict = update_saas_user_attributes_param.from_dict(update_saas_user_attributes_param_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/pricing/UpdateSaasUserEmailParam.md b/docs/pricing/UpdateSaasUserEmailParam.md new file mode 100644 index 0000000..4ba8d8f --- /dev/null +++ b/docs/pricing/UpdateSaasUserEmailParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserEmailParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | E-mail | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserEmailParam from a JSON string +update_saas_user_email_param_instance = UpdateSaasUserEmailParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserEmailParam.to_json() + +# convert the object into a dict +update_saas_user_email_param_dict = update_saas_user_email_param_instance.to_dict() +# create an instance of UpdateSaasUserEmailParam from a dict +update_saas_user_email_param_form_dict = update_saas_user_email_param.from_dict(update_saas_user_email_param_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/pricing/UpdateSaasUserPasswordParam.md b/docs/pricing/UpdateSaasUserPasswordParam.md new file mode 100644 index 0000000..1138410 --- /dev/null +++ b/docs/pricing/UpdateSaasUserPasswordParam.md @@ -0,0 +1,28 @@ +# UpdateSaasUserPasswordParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSaasUserPasswordParam from a JSON string +update_saas_user_password_param_instance = UpdateSaasUserPasswordParam.from_json(json) +# print the JSON string representation of the object +print UpdateSaasUserPasswordParam.to_json() + +# convert the object into a dict +update_saas_user_password_param_dict = update_saas_user_password_param_instance.to_dict() +# create an instance of UpdateSaasUserPasswordParam from a dict +update_saas_user_password_param_form_dict = update_saas_user_password_param.from_dict(update_saas_user_password_param_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/pricing/UpdateSettingsParam.md b/docs/pricing/UpdateSettingsParam.md new file mode 100644 index 0000000..2b56c76 --- /dev/null +++ b/docs/pricing/UpdateSettingsParam.md @@ -0,0 +1,35 @@ +# UpdateSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_code** | **str** | | [optional] +**role_arn** | **str** | | [optional] +**role_external_id** | **str** | | [optional] +**sns_topic_arn** | **str** | | [optional] +**cas_bucket_name** | **str** | | [optional] +**cas_sns_topic_arn** | **str** | | [optional] +**seller_sns_topic_arn** | **str** | | [optional] +**sqs_arn** | **str** | | [optional] + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSettingsParam from a JSON string +update_settings_param_instance = UpdateSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSettingsParam.to_json() + +# convert the object into a dict +update_settings_param_dict = update_settings_param_instance.to_dict() +# create an instance of UpdateSettingsParam from a dict +update_settings_param_form_dict = update_settings_param.from_dict(update_settings_param_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/pricing/UpdateSignInSettingsParam.md b/docs/pricing/UpdateSignInSettingsParam.md new file mode 100644 index 0000000..063d776 --- /dev/null +++ b/docs/pricing/UpdateSignInSettingsParam.md @@ -0,0 +1,33 @@ +# UpdateSignInSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password_policy** | [**PasswordPolicy**](PasswordPolicy.md) | | [optional] +**device_configuration** | [**DeviceConfiguration**](DeviceConfiguration.md) | | [optional] +**mfa_configuration** | [**MfaConfiguration**](MfaConfiguration.md) | | [optional] +**recaptcha_props** | [**RecaptchaProps**](RecaptchaProps.md) | | [optional] +**account_verification** | [**AccountVerification**](AccountVerification.md) | | [optional] +**self_regist** | [**SelfRegist**](SelfRegist.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSignInSettingsParam from a JSON string +update_sign_in_settings_param_instance = UpdateSignInSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSignInSettingsParam.to_json() + +# convert the object into a dict +update_sign_in_settings_param_dict = update_sign_in_settings_param_instance.to_dict() +# create an instance of UpdateSignInSettingsParam from a dict +update_sign_in_settings_param_form_dict = update_sign_in_settings_param.from_dict(update_sign_in_settings_param_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/pricing/UpdateSingleTenantSettingsParam.md b/docs/pricing/UpdateSingleTenantSettingsParam.md new file mode 100644 index 0000000..a33f463 --- /dev/null +++ b/docs/pricing/UpdateSingleTenantSettingsParam.md @@ -0,0 +1,32 @@ +# UpdateSingleTenantSettingsParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | enable Single Tenant settings or not | [optional] +**role_arn** | **str** | ARN of the role for SaaS Platform to AssumeRole | [optional] +**cloudformation_template** | **str** | CloudFormation template file | [optional] +**ddl_template** | **str** | ddl file to run in SaaS environment | [optional] +**role_external_id** | **str** | External id used by SaaSus when AssumeRole to operate SaaS | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSingleTenantSettingsParam from a JSON string +update_single_tenant_settings_param_instance = UpdateSingleTenantSettingsParam.from_json(json) +# print the JSON string representation of the object +print UpdateSingleTenantSettingsParam.to_json() + +# convert the object into a dict +update_single_tenant_settings_param_dict = update_single_tenant_settings_param_instance.to_dict() +# create an instance of UpdateSingleTenantSettingsParam from a dict +update_single_tenant_settings_param_form_dict = update_single_tenant_settings_param.from_dict(update_single_tenant_settings_param_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/pricing/UpdateSoftwareTokenParam.md b/docs/pricing/UpdateSoftwareTokenParam.md new file mode 100644 index 0000000..7734434 --- /dev/null +++ b/docs/pricing/UpdateSoftwareTokenParam.md @@ -0,0 +1,29 @@ +# UpdateSoftwareTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | access token | +**verification_code** | **str** | verification code | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSoftwareTokenParam from a JSON string +update_software_token_param_instance = UpdateSoftwareTokenParam.from_json(json) +# print the JSON string representation of the object +print UpdateSoftwareTokenParam.to_json() + +# convert the object into a dict +update_software_token_param_dict = update_software_token_param_instance.to_dict() +# create an instance of UpdateSoftwareTokenParam from a dict +update_software_token_param_form_dict = update_software_token_param.from_dict(update_software_token_param_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/pricing/UpdateStripeInfoParam.md b/docs/pricing/UpdateStripeInfoParam.md new file mode 100644 index 0000000..5c4e96c --- /dev/null +++ b/docs/pricing/UpdateStripeInfoParam.md @@ -0,0 +1,28 @@ +# UpdateStripeInfoParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret_key** | **str** | secret key | + +## Example + +```python +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateStripeInfoParam from a JSON string +update_stripe_info_param_instance = UpdateStripeInfoParam.from_json(json) +# print the JSON string representation of the object +print UpdateStripeInfoParam.to_json() + +# convert the object into a dict +update_stripe_info_param_dict = update_stripe_info_param_instance.to_dict() +# create an instance of UpdateStripeInfoParam from a dict +update_stripe_info_param_form_dict = update_stripe_info_param.from_dict(update_stripe_info_param_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/pricing/UpdateTaxRateParam.md b/docs/pricing/UpdateTaxRateParam.md new file mode 100644 index 0000000..6a5c2e3 --- /dev/null +++ b/docs/pricing/UpdateTaxRateParam.md @@ -0,0 +1,29 @@ +# UpdateTaxRateParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | Display name | +**description** | **str** | Description | + +## Example + +```python +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTaxRateParam from a JSON string +update_tax_rate_param_instance = UpdateTaxRateParam.from_json(json) +# print the JSON string representation of the object +print UpdateTaxRateParam.to_json() + +# convert the object into a dict +update_tax_rate_param_dict = update_tax_rate_param_instance.to_dict() +# create an instance of UpdateTaxRateParam from a dict +update_tax_rate_param_form_dict = update_tax_rate_param.from_dict(update_tax_rate_param_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/pricing/UpdateTenantIdentityProviderParam.md b/docs/pricing/UpdateTenantIdentityProviderParam.md new file mode 100644 index 0000000..72c596b --- /dev/null +++ b/docs/pricing/UpdateTenantIdentityProviderParam.md @@ -0,0 +1,30 @@ +# UpdateTenantIdentityProviderParam + +If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | [**ProviderType**](ProviderType.md) | | +**identity_provider_props** | [**TenantIdentityProviderProps**](TenantIdentityProviderProps.md) | | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantIdentityProviderParam from a JSON string +update_tenant_identity_provider_param_instance = UpdateTenantIdentityProviderParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantIdentityProviderParam.to_json() + +# convert the object into a dict +update_tenant_identity_provider_param_dict = update_tenant_identity_provider_param_instance.to_dict() +# create an instance of UpdateTenantIdentityProviderParam from a dict +update_tenant_identity_provider_param_form_dict = update_tenant_identity_provider_param.from_dict(update_tenant_identity_provider_param_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/pricing/UpdateTenantUserParam.md b/docs/pricing/UpdateTenantUserParam.md new file mode 100644 index 0000000..d3e61fe --- /dev/null +++ b/docs/pricing/UpdateTenantUserParam.md @@ -0,0 +1,28 @@ +# UpdateTenantUserParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Dict[str, object]** | Attribute information (Get information set by defining user attributes in the SaaS development console) | + +## Example + +```python +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTenantUserParam from a JSON string +update_tenant_user_param_instance = UpdateTenantUserParam.from_json(json) +# print the JSON string representation of the object +print UpdateTenantUserParam.to_json() + +# convert the object into a dict +update_tenant_user_param_dict = update_tenant_user_param_instance.to_dict() +# create an instance of UpdateTenantUserParam from a dict +update_tenant_user_param_form_dict = update_tenant_user_param.from_dict(update_tenant_user_param_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/pricing/User.md b/docs/pricing/User.md new file mode 100644 index 0000000..08ea082 --- /dev/null +++ b/docs/pricing/User.md @@ -0,0 +1,28 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print User.to_json() + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_form_dict = user.from_dict(user_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/pricing/UserAttributeApi.md b/docs/pricing/UserAttributeApi.md new file mode 100644 index 0000000..2f3a4d8 --- /dev/null +++ b/docs/pricing/UserAttributeApi.md @@ -0,0 +1,318 @@ +# saasus_sdk_python.src.auth.UserAttributeApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_saas_user_attribute**](UserAttributeApi.md#create_saas_user_attribute) | **POST** /saas-user-attributes | Create SaaS User Attributes +[**create_user_attribute**](UserAttributeApi.md#create_user_attribute) | **POST** /user-attributes | Create User Attributes +[**delete_user_attribute**](UserAttributeApi.md#delete_user_attribute) | **DELETE** /user-attributes/{attribute_name} | Delete User Attribute +[**get_user_attributes**](UserAttributeApi.md#get_user_attributes) | **GET** /user-attributes | Get User Attributes + + +# **create_saas_user_attribute** +> Attribute create_saas_user_attribute(body=body) + +Create SaaS User Attributes + +Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create SaaS User Attributes + api_response = api_instance.create_saas_user_attribute(body=body) + print("The response of UserAttributeApi->create_saas_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_saas_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **create_user_attribute** +> Attribute create_user_attribute(body=body) + +Create User Attributes + +Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + body = saasus_sdk_python.src.auth.Attribute() # Attribute | (optional) + + try: + # Create User Attributes + api_response = api_instance.create_user_attribute(body=body) + print("The response of UserAttributeApi->create_user_attribute:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->create_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Attribute**| | [optional] + +### Return type + +[**Attribute**](Attribute.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**500** | Internal Server Error | - | + +[[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) + +# **delete_user_attribute** +> delete_user_attribute(attribute_name) + +Delete User Attribute + +Delete user attributes kept on the SaaSus Platform. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + attribute_name = 'birthday' # str | Attribute Name + + try: + # Delete User Attribute + api_instance.delete_user_attribute(attribute_name) + except Exception as e: + print("Exception when calling UserAttributeApi->delete_user_attribute: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attribute_name** | **str**| Attribute Name | + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_attributes** +> UserAttributes get_user_attributes() + +Get User Attributes + +Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserAttributeApi(api_client) + + try: + # Get User Attributes + api_response = api_instance.get_user_attributes() + print("The response of UserAttributeApi->get_user_attributes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserAttributeApi->get_user_attributes: %s\n" % e) +``` + + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserAttributes**](UserAttributes.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[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/pricing/UserAttributes.md b/docs/pricing/UserAttributes.md new file mode 100644 index 0000000..0fe3d6a --- /dev/null +++ b/docs/pricing/UserAttributes.md @@ -0,0 +1,28 @@ +# UserAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_attributes** | [**List[Attribute]**](Attribute.md) | User Attribute Definition | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAttributes from a JSON string +user_attributes_instance = UserAttributes.from_json(json) +# print the JSON string representation of the object +print UserAttributes.to_json() + +# convert the object into a dict +user_attributes_dict = user_attributes_instance.to_dict() +# create an instance of UserAttributes from a dict +user_attributes_form_dict = user_attributes.from_dict(user_attributes_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/pricing/UserAvailableEnv.md b/docs/pricing/UserAvailableEnv.md new file mode 100644 index 0000000..9594892 --- /dev/null +++ b/docs/pricing/UserAvailableEnv.md @@ -0,0 +1,31 @@ +# UserAvailableEnv + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | env name | +**display_name** | **str** | env display name | [optional] +**roles** | [**List[Role]**](Role.md) | role info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableEnv from a JSON string +user_available_env_instance = UserAvailableEnv.from_json(json) +# print the JSON string representation of the object +print UserAvailableEnv.to_json() + +# convert the object into a dict +user_available_env_dict = user_available_env_instance.to_dict() +# create an instance of UserAvailableEnv from a dict +user_available_env_form_dict = user_available_env.from_dict(user_available_env_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/pricing/UserAvailableTenant.md b/docs/pricing/UserAvailableTenant.md new file mode 100644 index 0000000..62492fa --- /dev/null +++ b/docs/pricing/UserAvailableTenant.md @@ -0,0 +1,35 @@ +# UserAvailableTenant + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | Tenant Name | +**completed_sign_up** | **bool** | | +**envs** | [**List[UserAvailableEnv]**](UserAvailableEnv.md) | environmental info, role info | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**back_office_staff_email** | **str** | back office contact email | +**plan_id** | **str** | | [optional] +**is_paid** | **bool** | tenant payment status ※ Currently, it is returned only when stripe is linked. | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAvailableTenant from a JSON string +user_available_tenant_instance = UserAvailableTenant.from_json(json) +# print the JSON string representation of the object +print UserAvailableTenant.to_json() + +# convert the object into a dict +user_available_tenant_dict = user_available_tenant_instance.to_dict() +# create an instance of UserAvailableTenant from a dict +user_available_tenant_form_dict = user_available_tenant.from_dict(user_available_tenant_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/pricing/UserInfo.md b/docs/pricing/UserInfo.md new file mode 100644 index 0000000..39c4f3a --- /dev/null +++ b/docs/pricing/UserInfo.md @@ -0,0 +1,31 @@ +# UserInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email** | **str** | E-mail | +**user_attribute** | **Dict[str, object]** | user additional attributes | +**tenants** | [**List[UserAvailableTenant]**](UserAvailableTenant.md) | Tenant Info | + +## Example + +```python +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfo from a JSON string +user_info_instance = UserInfo.from_json(json) +# print the JSON string representation of the object +print UserInfo.to_json() + +# convert the object into a dict +user_info_dict = user_info_instance.to_dict() +# create an instance of UserInfo from a dict +user_info_form_dict = user_info.from_dict(user_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/pricing/UserInfoApi.md b/docs/pricing/UserInfoApi.md new file mode 100644 index 0000000..7e8124c --- /dev/null +++ b/docs/pricing/UserInfoApi.md @@ -0,0 +1,168 @@ +# saasus_sdk_python.src.auth.UserInfoApi + +All URIs are relative to *https://api.saasus.io/v1/auth* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_info**](UserInfoApi.md#get_user_info) | **GET** /userinfo | Get User Info +[**get_user_info_by_email**](UserInfoApi.md#get_user_info_by_email) | **GET** /userinfo/search/email | Get User Info by Email + + +# **get_user_info** +> UserInfo get_user_info(token) + +Get User Info + +User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + token = 'token_example' # str | ID Token + + try: + # Get User Info + api_response = api_instance.get_user_info(token) + print("The response of UserInfoApi->get_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| ID Token | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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) + +# **get_user_info_by_email** +> UserInfo get_user_info_by_email(email) + +Get User Info by Email + +Get user information by email address. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.UserInfoApi(api_client) + email = 'email_example' # str | Email + + try: + # Get User Info by Email + api_response = api_instance.get_user_info_by_email(email) + print("The response of UserInfoApi->get_user_info_by_email:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserInfoApi->get_user_info_by_email: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email | + +### Return type + +[**UserInfo**](UserInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/pricing/Users.md b/docs/pricing/Users.md new file mode 100644 index 0000000..b801106 --- /dev/null +++ b/docs/pricing/Users.md @@ -0,0 +1,28 @@ +# Users + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print Users.to_json() + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_form_dict = users.from_dict(users_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/pricing/ValidateInvitationParam.md b/docs/pricing/ValidateInvitationParam.md new file mode 100644 index 0000000..0cc6346 --- /dev/null +++ b/docs/pricing/ValidateInvitationParam.md @@ -0,0 +1,31 @@ +# ValidateInvitationParam + +Access token is required for existing users, and email and password is required for new users. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | Access token of the invited user | [optional] +**email** | **str** | Email address of the invited user | [optional] +**password** | **str** | Password of the invited user | [optional] + +## Example + +```python +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidateInvitationParam from a JSON string +validate_invitation_param_instance = ValidateInvitationParam.from_json(json) +# print the JSON string representation of the object +print ValidateInvitationParam.to_json() + +# convert the object into a dict +validate_invitation_param_dict = validate_invitation_param_instance.to_dict() +# create an instance of ValidateInvitationParam from a dict +validate_invitation_param_form_dict = validate_invitation_param.from_dict(validate_invitation_param_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/pricing/VerifyRegistrationTokenParam.md b/docs/pricing/VerifyRegistrationTokenParam.md new file mode 100644 index 0000000..127b4c1 --- /dev/null +++ b/docs/pricing/VerifyRegistrationTokenParam.md @@ -0,0 +1,28 @@ +# VerifyRegistrationTokenParam + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registration_token** | **str** | | + +## Example + +```python +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRegistrationTokenParam from a JSON string +verify_registration_token_param_instance = VerifyRegistrationTokenParam.from_json(json) +# print the JSON string representation of the object +print VerifyRegistrationTokenParam.to_json() + +# convert the object into a dict +verify_registration_token_param_dict = verify_registration_token_param_instance.to_dict() +# create an instance of VerifyRegistrationTokenParam from a dict +verify_registration_token_param_form_dict = verify_registration_token_param.from_dict(verify_registration_token_param_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/pricing/VisibilityStatus.md b/docs/pricing/VisibilityStatus.md new file mode 100644 index 0000000..8c591a5 --- /dev/null +++ b/docs/pricing/VisibilityStatus.md @@ -0,0 +1,10 @@ +# VisibilityStatus + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/pricing/Votes.md b/docs/pricing/Votes.md new file mode 100644 index 0000000..bff6129 --- /dev/null +++ b/docs/pricing/Votes.md @@ -0,0 +1,29 @@ +# Votes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[User]**](User.md) | | +**count** | **int** | | + +## Example + +```python +from saasus_sdk_python.src.communication.models.votes import Votes + +# TODO update the JSON string below +json = "{}" +# create an instance of Votes from a JSON string +votes_instance = Votes.from_json(json) +# print the JSON string representation of the object +print Votes.to_json() + +# convert the object into a dict +votes_dict = votes_instance.to_dict() +# create an instance of Votes from a dict +votes_form_dict = votes.from_dict(votes_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/generate.sh b/generate.sh index 9b6c053..b368be6 100755 --- a/generate.sh +++ b/generate.sh @@ -1,15 +1,72 @@ #!/bin/bash -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " - echo "Example: $0 authapi" - exit 1 -fi +# 生成するモジュール名の配列 +MODULES=("auth" "pricing" "billing" "awsmarketplace" "integration" "apilog" "communication" ) -packageName=$1 +# sdkに含まれる生成したプログラムを削除 +SDK_SRC_DIR="saasus_sdk_python/src" +SDK_TEST_DIR="test" -docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \ - -i /local/${packageName}.yml \ +# 削除対象ディレクトリ +DELETE_DIRS=("generated") + +for module in "${MODULES[@]}" +do + if [ -d ${SDK_SRC_DIR}/${module} ]; then + rm -rf ${SDK_SRC_DIR}/${module} + echo "delete ${SDK_SRC_DIR}/${module} success" + fi + if [ -d ${SDK_TEST_DIR}/${module} ]; then + rm -rf ${SDK_TEST_DIR}/${module} + echo "delete ${SDK_TEST_DIR}/${module} success" + fi +done + +# pythondocを削除 +rm -rf ./docs/* +echo "delete pythondoc success" + +for dir in "${DELETE_DIRS[@]}" +do + if [ -d ./${dir} ]; then + rm -rf ./${dir} + fi +done + +#Pythonクラスを生成 +for module in "${MODULES[@]}" +do + if [ "${module}" = "integration" ]; then + target="/local/${module}.yml" + else + target="/local/${module}api.yml" + fi + + # don't use v7.3.0 + # https://github.com/OpenAPITools/openapi-generator/issues/17863 + docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v7.0.0 generate \ + -i ${target} \ -g python \ - -o /local \ - --package-name saasus_sdk_python + -o /local/saasus_sdk_python/generated/ \ + --additional-properties useOneOfDiscriminatorLookup=true \ + --template-dir /local/templates/openapi-generator/python-v7-0-0/ \ + --package-name saasus_sdk_python.src.${module} +done + +poetry install +poetry run bump-pydantic saasus_sdk_python/generated + +for module in "${MODULES[@]}" +do + # プログラム + cp -pr "saasus_sdk_python/generated/${SDK_SRC_DIR}/${module}" "${SDK_SRC_DIR}/${module}" + # テストケース + cp -pr "saasus_sdk_python/generated/${SDK_SRC_DIR}/${module}" "${SDK_TEST_DIR}/${module}" + # pythondoc + mkdir -p "docs/${module}" && cp -p saasus_sdk_python/generated/docs/* "docs/${module}/" + echo "copy ${module} success" +done + +# 生成したプログラムを削除 +rm -rf ./saasus_sdk_python/generated +echo "delete generated success" \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 399d417..01ac06d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aenum" @@ -12,26 +12,58 @@ files = [ {file = "aenum-3.1.15.tar.gz", hash = "sha256:8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559"}, ] +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} + [[package]] name = "anyio" -version = "4.0.0" +version = "4.5.2" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" files = [ - {file = "anyio-4.0.0-py3-none-any.whl", hash = "sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f"}, - {file = "anyio-4.0.0.tar.gz", hash = "sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a"}, + {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"}, + {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.22)"] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] +trio = ["trio (>=0.26.1)"] + +[[package]] +name = "bump-pydantic" +version = "0.8.0" +description = "Convert Pydantic from V1 to V2 ♻" +optional = false +python-versions = ">=3.8" +files = [ + {file = "bump_pydantic-0.8.0-py3-none-any.whl", hash = "sha256:6cbb4deb5869a69baa5a477f28f3e2d8fb09b687e114c018bd54470590ae7bf7"}, + {file = "bump_pydantic-0.8.0.tar.gz", hash = "sha256:6092e61930e85619e74eeb04131b4387feda16f02d8bb2e3cf9507fa492c69e9"}, +] + +[package.dependencies] +libcst = ">=0.4.2" +rich = "*" +typer = ">=0.7.0" +typing-extensions = "*" [[package]] name = "click" @@ -60,13 +92,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.1.3" +version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -93,19 +125,19 @@ all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)" [[package]] name = "flake8" -version = "6.1.0" +version = "3.9.2" description = "the modular source code checker: pep8 pyflakes and co" optional = false -python-versions = ">=3.8.1" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ - {file = "flake8-6.1.0-py2.py3-none-any.whl", hash = "sha256:ffdfce58ea94c6580c77888a86506937f9a1a227dfcd15f245d694ae20a6b6e5"}, - {file = "flake8-6.1.0.tar.gz", hash = "sha256:d5b3857f07c030bdb5bf41c7f53799571d75c4491748a3adcd47de929e34cd23"}, + {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, + {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, ] [package.dependencies] -mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.11.0,<2.12.0" -pyflakes = ">=3.1.0,<3.2.0" +mccabe = ">=0.6.0,<0.7.0" +pycodestyle = ">=2.7.0,<2.8.0" +pyflakes = ">=2.3.0,<2.4.0" [[package]] name = "h11" @@ -120,24 +152,121 @@ files = [ [[package]] name = "idna" -version = "3.4" +version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, + {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, + {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, ] +[package.extras] +all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] + +[[package]] +name = "libcst" +version = "1.1.0" +description = "A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7, 3.8, 3.9, and 3.10 programs." +optional = false +python-versions = ">=3.8" +files = [ + {file = "libcst-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:63f75656fd733dc20354c46253fde3cf155613e37643c3eaf6f8818e95b7a3d1"}, + {file = "libcst-1.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8ae11eb1ea55a16dc0cdc61b41b29ac347da70fec14cc4381248e141ee2fbe6c"}, + {file = "libcst-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4bc745d0c06420fe2644c28d6ddccea9474fb68a2135904043676deb4fa1e6bc"}, + {file = "libcst-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c1f2da45f1c45634090fd8672c15e0159fdc46853336686959b2d093b6e10fa"}, + {file = "libcst-1.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:003e5e83a12eed23542c4ea20fdc8de830887cc03662432bb36f84f8c4841b81"}, + {file = "libcst-1.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:3ebbb9732ae3cc4ae7a0e97890bed0a57c11d6df28790c2b9c869f7da653c7c7"}, + {file = "libcst-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d68c34e3038d3d1d6324eb47744cbf13f2c65e1214cf49db6ff2a6603c1cd838"}, + {file = "libcst-1.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9dffa1795c2804d183efb01c0f1efd20a7831db6a21a0311edf90b4100d67436"}, + {file = "libcst-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc9b6ac36d7ec9db2f053014ea488086ca2ed9c322be104fbe2c71ca759da4bb"}, + {file = "libcst-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b7a38ec4c1c009ac39027d51558b52851fb9234669ba5ba62283185963a31c"}, + {file = "libcst-1.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5297a16e575be8173185e936b7765c89a3ca69d4ae217a4af161814a0f9745a7"}, + {file = "libcst-1.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:7ccaf53925f81118aeaadb068a911fac8abaff608817d7343da280616a5ca9c1"}, + {file = "libcst-1.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:75816647736f7e09c6120bdbf408456f99b248d6272277eed9a58cf50fb8bc7d"}, + {file = "libcst-1.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c8f26250f87ca849a7303ed7a4fd6b2c7ac4dec16b7d7e68ca6a476d7c9bfcdb"}, + {file = "libcst-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d37326bd6f379c64190a28947a586b949de3a76be00176b0732c8ee87d67ebe"}, + {file = "libcst-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3d8cf974cfa2487b28f23f56c4bff90d550ef16505e58b0dca0493d5293784b"}, + {file = "libcst-1.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82d1271403509b0a4ee6ff7917c2d33b5a015f44d1e208abb1da06ba93b2a378"}, + {file = "libcst-1.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:bca1841693941fdd18371824bb19a9702d5784cd347cb8231317dbdc7062c5bc"}, + {file = "libcst-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f36f592e035ef84f312a12b75989dde6a5f6767fe99146cdae6a9ee9aff40dd0"}, + {file = "libcst-1.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f561c9a84eca18be92f4ad90aa9bd873111efbea995449301719a1a7805dbc5c"}, + {file = "libcst-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97fbc73c87e9040e148881041fd5ffa2a6ebf11f64b4ccb5b52e574b95df1a15"}, + {file = "libcst-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99fdc1929703fd9e7408aed2e03f58701c5280b05c8911753a8d8619f7dfdda5"}, + {file = "libcst-1.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bf69cbbab5016d938aac4d3ae70ba9ccb3f90363c588b3b97be434e6ba95403"}, + {file = "libcst-1.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:fe41b33aa73635b1651f64633f429f7aa21f86d2db5748659a99d9b7b1ed2a90"}, + {file = "libcst-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:73c086705ed34dbad16c62c9adca4249a556c1b022993d511da70ea85feaf669"}, + {file = "libcst-1.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3a07ecfabbbb8b93209f952a365549e65e658831e9231649f4f4e4263cad24b1"}, + {file = "libcst-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c653d9121d6572d8b7f8abf20f88b0a41aab77ff5a6a36e5a0ec0f19af0072e8"}, + {file = "libcst-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f1cd308a4c2f71d5e4eec6ee693819933a03b78edb2e4cc5e3ad1afd5fb3f07"}, + {file = "libcst-1.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8afb6101b8b3c86c5f9cec6b90ab4da16c3c236fe7396f88e8b93542bb341f7c"}, + {file = "libcst-1.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:d22d1abfe49aa60fc61fa867e10875a9b3024ba5a801112f4d7ba42d8d53242e"}, + {file = "libcst-1.1.0.tar.gz", hash = "sha256:0acbacb9a170455701845b7e940e2d7b9519db35a86768d86330a0b0deae1086"}, +] + +[package.dependencies] +pyyaml = ">=5.2" +typing-extensions = ">=3.7.4.2" +typing-inspect = ">=0.4.0" + +[package.extras] +dev = ["Sphinx (>=5.1.1)", "black (==23.9.1)", "build (>=0.10.0)", "coverage (>=4.5.4)", "fixit (==2.0.0.post1)", "flake8 (>=3.7.8,<5)", "hypothesis (>=4.36.0)", "hypothesmith (>=0.0.4)", "jinja2 (==3.1.2)", "jupyter (>=1.0.0)", "maturin (>=0.8.3,<0.16)", "nbsphinx (>=0.4.2)", "prompt-toolkit (>=2.0.9)", "pyre-check (==0.9.18)", "setuptools-rust (>=1.5.2)", "setuptools-scm (>=6.0.1)", "slotscheck (>=0.7.1)", "sphinx-rtd-theme (>=0.4.3)", "ufmt (==2.2.0)", "usort (==1.0.7)"] + +[[package]] +name = "markdown-it-py" +version = "3.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.8" +files = [ + {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, + {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +code-style = ["pre-commit (>=3.0,<4.0)"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins"] +profiling = ["gprof2dot"] +rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "mccabe" -version = "0.7.0" +version = "0.6.1" description = "McCabe checker, plugin for flake8" optional = false -python-versions = ">=3.6" +python-versions = "*" +files = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +description = "Markdown URL utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." +optional = false +python-versions = ">=3.5" files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] [[package]] @@ -156,180 +285,142 @@ urllib3 = ">=1.25.3" [[package]] name = "pycodestyle" -version = "2.11.0" +version = "2.7.0" description = "Python style guide checker" optional = false -python-versions = ">=3.8" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "pycodestyle-2.11.0-py2.py3-none-any.whl", hash = "sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"}, - {file = "pycodestyle-2.11.0.tar.gz", hash = "sha256:259bcc17857d8a8b3b4a2327324b79e5f020a13c16074670f9c8c8f872ea76d0"}, + {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, + {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, ] [[package]] name = "pydantic" -version = "1.10.12" -description = "Data validation and settings management using python type hints" +version = "2.10.3" +description = "Data validation using Python type hints" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic-1.10.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a1fcb59f2f355ec350073af41d927bf83a63b50e640f4dbaa01053a28b7a7718"}, - {file = "pydantic-1.10.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b7ccf02d7eb340b216ec33e53a3a629856afe1c6e0ef91d84a4e6f2fb2ca70fe"}, - {file = "pydantic-1.10.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fb2aa3ab3728d950bcc885a2e9eff6c8fc40bc0b7bb434e555c215491bcf48b"}, - {file = "pydantic-1.10.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:771735dc43cf8383959dc9b90aa281f0b6092321ca98677c5fb6125a6f56d58d"}, - {file = "pydantic-1.10.12-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ca48477862372ac3770969b9d75f1bf66131d386dba79506c46d75e6b48c1e09"}, - {file = "pydantic-1.10.12-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a5e7add47a5b5a40c49b3036d464e3c7802f8ae0d1e66035ea16aa5b7a3923ed"}, - {file = "pydantic-1.10.12-cp310-cp310-win_amd64.whl", hash = "sha256:e4129b528c6baa99a429f97ce733fff478ec955513630e61b49804b6cf9b224a"}, - {file = "pydantic-1.10.12-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b0d191db0f92dfcb1dec210ca244fdae5cbe918c6050b342d619c09d31eea0cc"}, - {file = "pydantic-1.10.12-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:795e34e6cc065f8f498c89b894a3c6da294a936ee71e644e4bd44de048af1405"}, - {file = "pydantic-1.10.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69328e15cfda2c392da4e713443c7dbffa1505bc9d566e71e55abe14c97ddc62"}, - {file = "pydantic-1.10.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2031de0967c279df0d8a1c72b4ffc411ecd06bac607a212892757db7462fc494"}, - {file = "pydantic-1.10.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ba5b2e6fe6ca2b7e013398bc7d7b170e21cce322d266ffcd57cca313e54fb246"}, - {file = "pydantic-1.10.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2a7bac939fa326db1ab741c9d7f44c565a1d1e80908b3797f7f81a4f86bc8d33"}, - {file = "pydantic-1.10.12-cp311-cp311-win_amd64.whl", hash = "sha256:87afda5539d5140cb8ba9e8b8c8865cb5b1463924d38490d73d3ccfd80896b3f"}, - {file = "pydantic-1.10.12-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:549a8e3d81df0a85226963611950b12d2d334f214436a19537b2efed61b7639a"}, - {file = "pydantic-1.10.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:598da88dfa127b666852bef6d0d796573a8cf5009ffd62104094a4fe39599565"}, - {file = "pydantic-1.10.12-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba5c4a8552bff16c61882db58544116d021d0b31ee7c66958d14cf386a5b5350"}, - {file = "pydantic-1.10.12-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c79e6a11a07da7374f46970410b41d5e266f7f38f6a17a9c4823db80dadf4303"}, - {file = "pydantic-1.10.12-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab26038b8375581dc832a63c948f261ae0aa21f1d34c1293469f135fa92972a5"}, - {file = "pydantic-1.10.12-cp37-cp37m-win_amd64.whl", hash = "sha256:e0a16d274b588767602b7646fa05af2782576a6cf1022f4ba74cbb4db66f6ca8"}, - {file = "pydantic-1.10.12-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6a9dfa722316f4acf4460afdf5d41d5246a80e249c7ff475c43a3a1e9d75cf62"}, - {file = "pydantic-1.10.12-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a73f489aebd0c2121ed974054cb2759af8a9f747de120acd2c3394cf84176ccb"}, - {file = "pydantic-1.10.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b30bcb8cbfccfcf02acb8f1a261143fab622831d9c0989707e0e659f77a18e0"}, - {file = "pydantic-1.10.12-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fcfb5296d7877af406ba1547dfde9943b1256d8928732267e2653c26938cd9c"}, - {file = "pydantic-1.10.12-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2f9a6fab5f82ada41d56b0602606a5506aab165ca54e52bc4545028382ef1c5d"}, - {file = "pydantic-1.10.12-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:dea7adcc33d5d105896401a1f37d56b47d443a2b2605ff8a969a0ed5543f7e33"}, - {file = "pydantic-1.10.12-cp38-cp38-win_amd64.whl", hash = "sha256:1eb2085c13bce1612da8537b2d90f549c8cbb05c67e8f22854e201bde5d98a47"}, - {file = "pydantic-1.10.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ef6c96b2baa2100ec91a4b428f80d8f28a3c9e53568219b6c298c1125572ebc6"}, - {file = "pydantic-1.10.12-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6c076be61cd0177a8433c0adcb03475baf4ee91edf5a4e550161ad57fc90f523"}, - {file = "pydantic-1.10.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d5a58feb9a39f481eda4d5ca220aa8b9d4f21a41274760b9bc66bfd72595b86"}, - {file = "pydantic-1.10.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5f805d2d5d0a41633651a73fa4ecdd0b3d7a49de4ec3fadf062fe16501ddbf1"}, - {file = "pydantic-1.10.12-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1289c180abd4bd4555bb927c42ee42abc3aee02b0fb2d1223fb7c6e5bef87dbe"}, - {file = "pydantic-1.10.12-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5d1197e462e0364906cbc19681605cb7c036f2475c899b6f296104ad42b9f5fb"}, - {file = "pydantic-1.10.12-cp39-cp39-win_amd64.whl", hash = "sha256:fdbdd1d630195689f325c9ef1a12900524dceb503b00a987663ff4f58669b93d"}, - {file = "pydantic-1.10.12-py3-none-any.whl", hash = "sha256:b749a43aa51e32839c9d71dc67eb1e4221bb04af1033a32e3923d46f9effa942"}, - {file = "pydantic-1.10.12.tar.gz", hash = "sha256:0fe8a415cea8f340e7a9af9c54fc71a649b43e8ca3cc732986116b3cb135d303"}, + {file = "pydantic-2.10.3-py3-none-any.whl", hash = "sha256:be04d85bbc7b65651c5f8e6b9976ed9c6f41782a55524cef079a34a0bb82144d"}, + {file = "pydantic-2.10.3.tar.gz", hash = "sha256:cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"}, ] [package.dependencies] -typing-extensions = ">=4.2.0" +annotated-types = ">=0.6.0" +pydantic-core = "2.27.1" +typing-extensions = ">=4.12.2" [package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.7.0" -description = "" +version = "2.27.1" +description = "Core functionality for Pydantic validation and serialization" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.7.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:17978f7565482bf94c3d424e0a24b2c8606e4323e1cb930e104e05702d8be30c"}, - {file = "pydantic_core-2.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bf91a322659863a62a195f7a015cde4d876ba8f206d943f536b985d6982797ef"}, - {file = "pydantic_core-2.7.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f38d480700c741af7446880a61985b61ba0d4d01cbcb48657723e9e6d093d0a3"}, - {file = "pydantic_core-2.7.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8193f726ed32e373226b455f6f4fc4bf5c2ec0ffd372428c493d35ea03729116"}, - {file = "pydantic_core-2.7.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:47f8a21007e218fd6b74512a1ec91992d95328ffbfe9a78797aab2a1a35dfce9"}, - {file = "pydantic_core-2.7.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55fb5495b5688c7104353e619730c7a66fffc296a09ced8323853f74c56a1626"}, - {file = "pydantic_core-2.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38207566b3ebc803c3e9bc1835930908f3622590525b1fcc7723756f49ab7f15"}, - {file = "pydantic_core-2.7.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4c547e95edaf17b28b3387ad23def30dee5f912f47153bd69042d69a69f846f3"}, - {file = "pydantic_core-2.7.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d57de08a7c56f8c2773a838ffaf996da5efd5fe145564cb94ab638ea900870ae"}, - {file = "pydantic_core-2.7.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:64e155ec9c6313c5a6cad36ca61d1ac25bc199ff4fa19b7a9a26a312d92d4dba"}, - {file = "pydantic_core-2.7.0-cp310-none-win32.whl", hash = "sha256:dd63ec3faa6a671a86d50f8245c28b433d88185b579b2fc60e7a901ce372db36"}, - {file = "pydantic_core-2.7.0-cp310-none-win_amd64.whl", hash = "sha256:ec340d1794c3f833e636bf9f81fcb1c35ed52e3b6e8987d5039bf0c703e4e43b"}, - {file = "pydantic_core-2.7.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:a59faec8d5a3847a777cb1df0bbc11d82f8904043efef088b63a77b2876eb76c"}, - {file = "pydantic_core-2.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:608dae1942239e8c0d951f3bd18530211f753697fa0dd6a2877fa54fa511e709"}, - {file = "pydantic_core-2.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f45e3311c88dcd8d65d0a589e0c2e112ec6d6f373549134f7d4d18edd5091098"}, - {file = "pydantic_core-2.7.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:69d042f469ac07d75577fe8a8017e621d93c016a188188dd5a0986950d9e7820"}, - {file = "pydantic_core-2.7.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d60b3a1eb1e969ded17c77f9a95a4191657f14177837b3cc2199742ff25a1f57"}, - {file = "pydantic_core-2.7.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c34d8a6b595f5056b50f7e8fb4b6c2c5edc8ae2306c2ac3ac3ae82cd960ae8f5"}, - {file = "pydantic_core-2.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:387b3674e564f9ea9707992fd61967f4b9cb0174f23cfa4cd90a1c4b22c54949"}, - {file = "pydantic_core-2.7.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:17b61efa2f28f398ed97a33d6a08587eccce338dfd9b4e75ef1198deacf7e579"}, - {file = "pydantic_core-2.7.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1ec7197f4836ac257e8a2061137149802a7322d3ff964047f9c9fffb78e56681"}, - {file = "pydantic_core-2.7.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b69f450e8334594f8ba56f1a9d9c22fd09af52e79d319210ef19db41ddd736"}, - {file = "pydantic_core-2.7.0-cp311-none-win32.whl", hash = "sha256:4910a3be1407faee92e30fe9dc949523457ee25a64d944aea11d69035719ed43"}, - {file = "pydantic_core-2.7.0-cp311-none-win_amd64.whl", hash = "sha256:fc5a65b61b81386de97f0eb6a08847c4814e8443fcb2551853d76712a9a0ff86"}, - {file = "pydantic_core-2.7.0-cp311-none-win_arm64.whl", hash = "sha256:b2512a1cf6145513b78ac788d5cdf39a5e016467b8dd48e2569f51d56318581b"}, - {file = "pydantic_core-2.7.0-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:0251baa682b430c8dc7e198ba52b62a6d8a1d30b718e7bb8cf30d1be8b8672ba"}, - {file = "pydantic_core-2.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:94c1bb1a5d98a82838c4c0bcfdbef29d2c660c49c5eae5d30935cd83aa9c3023"}, - {file = "pydantic_core-2.7.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bbecb4fadcd1b6c6d3fb3efe62be24757e00bd327a95923d6725d34c110c1df"}, - {file = "pydantic_core-2.7.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dac0b40f91b62d934e4b0d8b15e8c510adcda82a14b3144e857a2a59024e8bc4"}, - {file = "pydantic_core-2.7.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c7aec6e635c9cbd49cad97f92073713ff4b529095ff87cdc7c361b60f740a914"}, - {file = "pydantic_core-2.7.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9893a1ebd252c06366d4be3e13a395b434d5707d16a7b2782512257356343e44"}, - {file = "pydantic_core-2.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50f3e0f99b16c79fb4802525dab9e089b3f4b0ea426e9d7f4851473736e565dd"}, - {file = "pydantic_core-2.7.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14ff6bdf36fa23272ecfeec905d62a0410893a8d6db22a8eb958e542d9ecd944"}, - {file = "pydantic_core-2.7.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:4c8d33795cb0ac9b3c30f083c143c99283d22a9ca58c4759b098bd37ecee98da"}, - {file = "pydantic_core-2.7.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:784e268250a960927199bdc71c10b1f57c669872cce1757d1366f0f36de85eaa"}, - {file = "pydantic_core-2.7.0-cp312-none-win32.whl", hash = "sha256:4e95cb8832876d3c5936b4165bfdc90f57cc62d878e11888d1c3d834938a225f"}, - {file = "pydantic_core-2.7.0-cp312-none-win_amd64.whl", hash = "sha256:234c36560fbc3de867d12081dc330a3f2386ecd0647d1f9007d66b636b4a1086"}, - {file = "pydantic_core-2.7.0-cp312-none-win_arm64.whl", hash = "sha256:32f0718fb7d427bb978745d13b7a934e632e97a80f9758f7a7f18bced4cb5a64"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:0fa347cad5a94af1039ab41e0473dfd06c3b9a7574d5bce2683b87e08eb8d592"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ac248a0f2f318b7ce7a938e2f877e98f3d483bf6bf0dd125e66458a6a9976c3c"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:75887f19b068c0315b497c22ae27739041e4510c49ba5c255cef8dbc872dd45e"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ba96d8ad14ff8aa7a8afb029ecb631e45016abc7ecda9a8624731cb336c0c22b"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:345a2a46b9697a34409200da913298016c696139070709d318a567030d116ef3"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:216799fa19264d486b2e68770afacf5381b754c87c52f5cffa7b6d0edc36f484"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b87b89fb4b3a3d23eb0892b144849e978c1251350adec2f4d0ee5fd9ebad7719"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c66411e228a084b6beba54e5481b99c1b789283da8a520a2aaedd9da839857ec"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:10bc7132dd7c23e765788c60611e23948282de44ff2d58d8c4b084eb5507ef20"}, - {file = "pydantic_core-2.7.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e43a219dbccb776247b995bf0ab544369e0146ce3ebc5ad4f222bab53f3dd45d"}, - {file = "pydantic_core-2.7.0-cp37-none-win32.whl", hash = "sha256:6d2d8d12533b0c14495d47ffdf0029b10b8133c72858dff695eb79f82c8cdea1"}, - {file = "pydantic_core-2.7.0-cp37-none-win_amd64.whl", hash = "sha256:c29a5fac780b059ed61781b2490673272e56161ca8a03bad7ea002cac08f927e"}, - {file = "pydantic_core-2.7.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:ec57d409e15ae2ab9c0ec5402b3630ef8936dddf2526a1d1d867e9ffc6815896"}, - {file = "pydantic_core-2.7.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ab95926c31068b1dc81aad8be971d16f7f9ecd86b0cdabb71a00e6ddb0c01249"}, - {file = "pydantic_core-2.7.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:144b183455c56dac56fae40ec1252b38497c631b0e95d3f73d3a3f52f445aeed"}, - {file = "pydantic_core-2.7.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47278988b3e6cddca92e510a7c5d224c17de44602b27fe83928703748085bdfa"}, - {file = "pydantic_core-2.7.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04f95e76eb0abf5ecafb15e7a770c260459d4e64dc3e91fafc0f7cae67fe270b"}, - {file = "pydantic_core-2.7.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6cf982a0c8b5b6643794948a1ab59589a36d165158cb9394f3d906387cbd29ca"}, - {file = "pydantic_core-2.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46cf93ae078296a3f20d63d11c5b727429226e1e216778b66776b434cc551706"}, - {file = "pydantic_core-2.7.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e8aa2be2b255f3302206d1324e4eeadbfc2f654304251588af06af5b4d148050"}, - {file = "pydantic_core-2.7.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b4b451a03f8d32a26d4138f50018b878aba1ff654e481e6e1bfe7e8d336335a8"}, - {file = "pydantic_core-2.7.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e12693aa4468f57869cc4cd69e647b0ed106b72069db8c3346c530c963047bfa"}, - {file = "pydantic_core-2.7.0-cp38-none-win32.whl", hash = "sha256:26b890ab8983706b548b3edd584fba23c4228885e40d86b3097f7375a61ddf27"}, - {file = "pydantic_core-2.7.0-cp38-none-win_amd64.whl", hash = "sha256:8ce13c59840f4980891e5f7f6ab66074347836f4a3ce90f3feadeeec4790258d"}, - {file = "pydantic_core-2.7.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:11429885427c7a5aaab0dfb64bc149aec24a9d09bbd7f507dcb1cc91e69183d2"}, - {file = "pydantic_core-2.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f1afcc1ef2ab9365e3aff706944b934a0cd1f5cac9a5b864b17586b9603de5f2"}, - {file = "pydantic_core-2.7.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab7dba2115c05b39f919ee9ae6a5f1eeed922eeebf78e7089b87a2f5dfd1ffba"}, - {file = "pydantic_core-2.7.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:663cd5c68362b99c4a5e1187ee41c85fac1cde4ca6ebd2c9f02ca5cf5b1d4749"}, - {file = "pydantic_core-2.7.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3611fd8558b714a5defb6718511362c2941d1e89491049fda27de9b74bad8244"}, - {file = "pydantic_core-2.7.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23de8a584f75520cbe4bacb221f8a6cbb9952272ec3a9e20bd219eeabac84e28"}, - {file = "pydantic_core-2.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f0d7e367198d02bfc785b97ce6d1f61bb633f88d08b36a1027113624dbd82a"}, - {file = "pydantic_core-2.7.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:550587951534dee0c03394677aeb16f0128881bfe14398a7a9aec9716825ad79"}, - {file = "pydantic_core-2.7.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:01512f01108546b0fed873641ae9c78bf008a5020687ab6791eb92e32454abbc"}, - {file = "pydantic_core-2.7.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a8e187f7ac7f628728db9613a36a12df3da4e7380bb32199f6700d55d8e54943"}, - {file = "pydantic_core-2.7.0-cp39-none-win32.whl", hash = "sha256:c25202e46c95f5527e3ccd95e06d8631bdfeafc78d4d9a599f5da1216b1c1319"}, - {file = "pydantic_core-2.7.0-cp39-none-win_amd64.whl", hash = "sha256:3ceac92b6bff2c7ab1345750f7d90ad6eaaebef34235920684f6042229c347a5"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:36f650bd88868dbc5e68a62f6435c13d7873f37149efde2b7a0963ad6e7a3092"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:332aeb7642d63a0cb9a8898686a6cb528d410e1c0c7c866422df0b6c3832dfa6"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f36a3093e7dee9e9c887b0aaebb151b8ff002149a3e657a691bfe7e9c4ee58cc"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:229c5b95643b0f0f182f674acad6a39eacb2f8ec797a4abb687cbd8f004a0435"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7bf7de90d85d542a9e54406033ed53d563fcfa65e50075a5bee5166ffd210948"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5f98fa7aaeda5c62a5e9876bb5c29c0ee8758f0cf2b82f0378ec0b2ca0d06115"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:9e438d4bc0a2fd84379087bce986fc80124bd23e85ced372ed60006b3bb1d455"}, - {file = "pydantic_core-2.7.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:82beff04b1f216580c381ff816a51c6b5eb00ae018651399346f89a8fc3472fb"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:a3ca61db01b1cc1659007f3ce95718292d89c52e3dd15d8f7788ee318a75ce90"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0b3a2dc073a75a90dd00cb75768939ee069e84b65daeda894234ef6d0359a4b"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26e3ee931c594ee747f39a5dda5874eb6fa77167539b1249a05d6a1c3dcedaad"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:21d013fd24e3f3a7326772cbcb2766332b13bff315647ce2e7cb16467301434f"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d6cd485f5d66d59095d24a15386cf12b458703e3b584070bae69392f761afb95"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46888d1d674e872aa35dea5a45e9505610f4e9d59b5e3d67f45b55d20ddde660"}, - {file = "pydantic_core-2.7.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:eab33bebf7e3cdb20be005c1bf1646b0b681ba4559c4cced3c16d56de90f2711"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:38fc9538fa6b11260ca5ead98310080be5591b749826884f0388ddae8d944373"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:fad5715a5186152a75c5ae1021d5d8031de4d7845cc654411cbe9d9914be82fa"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1f77aea18f89c35b160c1a5c382f85bfcbe1e595d142ef7b76aec40e6089d85"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:978f2b7278b79235115294e9eda8377f9b36dc41fec1b1ae2865b2d85c28da6a"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:716a6482e82ac2f8a014fecf1730bbafbfc337ed8aea05d904b2b55fd90d4b93"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f99329c4db7435a5f45aef82565b76740c6b774eac9cfa9171a90670e55a070e"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:c74d50c57f75a02c92564d281f5212546ae224a842e0dd9c4621cfd316ad967b"}, - {file = "pydantic_core-2.7.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:7264eef3855c914f4be8082d91ea7921cce5d5eab14cddc2c52937cf2e204e50"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:c147aabb06d6de8f9863e53d03005adbd12df322e9ea8daf541489395548764c"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:05e8ff0ddd6111ae905bebe77eb14875ead774e31f890775ea91612b23924560"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38c9106e04aeb601ff47b8a922661fcf565a5581a9165d9e95c139e1d3d8d5a1"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00698c874bde92150feec243f159dc006816bd7f03d1282a061c5020594926e0"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d93f69cdac92a95a5ba7e62ca282889affd742467d330d0224efef4ee105d23f"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bb3942982055d5b49cef3fdd0ea97f34ca8b8c7751db2973aee76772d19c89d8"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:2ff6df9ea3107523f34bfac8c89587711b6dcd3296756aac3945e5aa1f10d340"}, - {file = "pydantic_core-2.7.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:72534d85769cb88aa625e6fa05006181e07cb8a3745c714b6ef1f964f5b738da"}, - {file = "pydantic_core-2.7.0.tar.gz", hash = "sha256:f8a842c9390ad187bd26f4fc0f96f0869e2e2d9cbf7b239837092c55d6bf8c0e"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, + {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, + {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, + {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, + {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, + {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, + {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, + {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, + {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, + {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, + {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, + {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, + {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, + {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, + {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, + {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, + {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, ] [package.dependencies] @@ -337,24 +428,38 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pyflakes" -version = "3.1.0" +version = "2.3.1" description = "passive checker of Python programs" optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, + {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, +] + +[[package]] +name = "pygments" +version = "2.18.0" +description = "Pygments is a syntax highlighting package written in Python." +optional = false python-versions = ">=3.8" files = [ - {file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"}, - {file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "python-dateutil" -version = "2.8.2" +version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, ] [package.dependencies] @@ -362,38 +467,130 @@ six = ">=1.5" [[package]] name = "python-dotenv" -version = "1.0.0" +version = "1.0.1" description = "Read key-value pairs from a .env file and set them as environment variables" optional = false python-versions = ">=3.8" files = [ - {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, - {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, + {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, + {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, ] [package.extras] cli = ["click (>=5.0)"] +[[package]] +name = "pyyaml" +version = "6.0.2" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, +] + +[[package]] +name = "rich" +version = "13.9.4" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, + {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, +] + +[package.dependencies] +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" +typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.11\""} + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<9)"] + +[[package]] +name = "shellingham" +version = "1.5.4" +description = "Tool to Detect Surrounding Shell" +optional = false +python-versions = ">=3.7" +files = [ + {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, + {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, +] + [[package]] name = "six" -version = "1.16.0" +version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, ] [[package]] name = "sniffio" -version = "1.3.0" +version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" files = [ - {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, - {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, ] [[package]] @@ -415,30 +612,62 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyaml"] [[package]] -name = "typing-extensions" -version = "4.7.1" -description = "Backported and Experimental Type Hints for Python 3.7+" +name = "typer" +version = "0.15.1" +description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, + {file = "typer-0.15.1-py3-none-any.whl", hash = "sha256:7994fb7b8155b64d3402518560648446072864beefd44aa2dc36972a5972e847"}, + {file = "typer-0.15.1.tar.gz", hash = "sha256:a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a"}, +] + +[package.dependencies] +click = ">=8.0.0" +rich = ">=10.11.0" +shellingham = ">=1.3.0" +typing-extensions = ">=3.7.4.3" + +[[package]] +name = "typing-extensions" +version = "4.12.2" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, +] + +[[package]] +name = "typing-inspect" +version = "0.9.0" +description = "Runtime inspection utilities for typing module." +optional = false +python-versions = "*" +files = [ + {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, + {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, ] +[package.dependencies] +mypy-extensions = ">=0.3.0" +typing-extensions = ">=3.7.4" + [[package]] name = "urllib3" -version = "2.0.4" +version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, - {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, + {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, + {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] @@ -463,5 +692,5 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", [metadata] lock-version = "2.0" -python-versions = "^3.9" -content-hash = "e7b989e497e0cf7cdc90696855833c9dbaa4713a3d0de0ee8dede4957af96958" +python-versions = "^3.8" +content-hash = "48ae831234449d26eb4218a70d528ddf2ab188481465cd4d75a7fd231baf60d6" diff --git a/pyproject.toml b/pyproject.toml index e3a1420..d14600e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "SaaSus Auth API Schema"] include = ["saasus_sdk_python/py.typed"] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.8" openapi-client = "^1.1.7" aenum = "^3.1.15" python-dotenv = "^1.0.0" @@ -19,9 +19,9 @@ python-dotenv = "^1.0.0" starlette = "0.27.0" uvicorn = "^0.23.2" fastapi = "^0.101.0" -flake8 = "^6.1.0" -pydantic = "^1.10.12" +flake8 = "^3.7.0" pydantic-core = "^2.4.0" +bump-pydantic = "^0.8.0" [build-system] requires = ["poetry-core"] diff --git a/saasus_sdk_python/__init__.py b/saasus_sdk_python/__init__.py index b39d149..e69de29 100644 --- a/saasus_sdk_python/__init__.py +++ b/saasus_sdk_python/__init__.py @@ -1,118 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from saasus_sdk_python.api.auth_info_api import AuthInfoApi -from saasus_sdk_python.api.basic_info_api import BasicInfoApi -from saasus_sdk_python.api.credential_api import CredentialApi -from saasus_sdk_python.api.env_api import EnvApi -from saasus_sdk_python.api.error_api import ErrorApi -from saasus_sdk_python.api.role_api import RoleApi -from saasus_sdk_python.api.saas_user_api import SaasUserApi -from saasus_sdk_python.api.saasus_tenant_api import SaasusTenantApi -from saasus_sdk_python.api.tenant_api import TenantApi -from saasus_sdk_python.api.tenant_attribute_api import TenantAttributeApi -from saasus_sdk_python.api.tenant_user_api import TenantUserApi -from saasus_sdk_python.api.user_attribute_api import UserAttributeApi -from saasus_sdk_python.api.user_info_api import UserInfoApi - -# import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.configuration import Configuration -from saasus_sdk_python.exceptions import OpenApiException -from saasus_sdk_python.exceptions import ApiTypeError -from saasus_sdk_python.exceptions import ApiValueError -from saasus_sdk_python.exceptions import ApiKeyError -from saasus_sdk_python.exceptions import ApiAttributeError -from saasus_sdk_python.exceptions import ApiException - -# import models into sdk package -from saasus_sdk_python.models.account_verification import AccountVerification -from saasus_sdk_python.models.api_keys import ApiKeys -from saasus_sdk_python.models.attribute import Attribute -from saasus_sdk_python.models.attribute_type import AttributeType -from saasus_sdk_python.models.auth_info import AuthInfo -from saasus_sdk_python.models.authorization_temp_code import AuthorizationTempCode -from saasus_sdk_python.models.basic_info import BasicInfo -from saasus_sdk_python.models.billing_address import BillingAddress -from saasus_sdk_python.models.billing_info import BillingInfo -from saasus_sdk_python.models.client_secret import ClientSecret -from saasus_sdk_python.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.create_saas_user_param import CreateSaasUserParam -from saasus_sdk_python.models.create_secret_code_param import CreateSecretCodeParam -from saasus_sdk_python.models.create_tenant_user_param import CreateTenantUserParam -from saasus_sdk_python.models.create_tenant_user_roles_param import CreateTenantUserRolesParam -from saasus_sdk_python.models.credentials import Credentials -from saasus_sdk_python.models.customize_page_props import CustomizePageProps -from saasus_sdk_python.models.customize_page_settings import CustomizePageSettings -from saasus_sdk_python.models.customize_page_settings_props import CustomizePageSettingsProps -from saasus_sdk_python.models.customize_pages import CustomizePages -from saasus_sdk_python.models.device_configuration import DeviceConfiguration -from saasus_sdk_python.models.dns_record import DnsRecord -from saasus_sdk_python.models.env import Env -from saasus_sdk_python.models.envs import Envs -from saasus_sdk_python.models.error import Error -from saasus_sdk_python.models.identity_provider_configuration import IdentityProviderConfiguration -from saasus_sdk_python.models.identity_provider_props import IdentityProviderProps -from saasus_sdk_python.models.identity_providers import IdentityProviders -from saasus_sdk_python.models.invoice_language import InvoiceLanguage -from saasus_sdk_python.models.link_aws_marketplace_param import LinkAwsMarketplaceParam -from saasus_sdk_python.models.message_template import MessageTemplate -from saasus_sdk_python.models.mfa_configuration import MfaConfiguration -from saasus_sdk_python.models.mfa_preference import MfaPreference -from saasus_sdk_python.models.notification_messages import NotificationMessages -from saasus_sdk_python.models.password_policy import PasswordPolicy -from saasus_sdk_python.models.plan_histories import PlanHistories -from saasus_sdk_python.models.plan_history import PlanHistory -from saasus_sdk_python.models.plan_reservation import PlanReservation -from saasus_sdk_python.models.provider_name import ProviderName -from saasus_sdk_python.models.recaptcha_props import RecaptchaProps -from saasus_sdk_python.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam -from saasus_sdk_python.models.role import Role -from saasus_sdk_python.models.roles import Roles -from saasus_sdk_python.models.saas_id import SaasId -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.models.saas_users import SaasUsers -from saasus_sdk_python.models.self_regist import SelfRegist -from saasus_sdk_python.models.sign_in_settings import SignInSettings -from saasus_sdk_python.models.sign_up_param import SignUpParam -from saasus_sdk_python.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.software_token_secret_code import SoftwareTokenSecretCode -from saasus_sdk_python.models.tenant import Tenant -from saasus_sdk_python.models.tenant_attributes import TenantAttributes -from saasus_sdk_python.models.tenant_detail import TenantDetail -from saasus_sdk_python.models.tenant_props import TenantProps -from saasus_sdk_python.models.tenants import Tenants -from saasus_sdk_python.models.update_basic_info_param import UpdateBasicInfoParam -from saasus_sdk_python.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam -from saasus_sdk_python.models.update_customize_pages_param import UpdateCustomizePagesParam -from saasus_sdk_python.models.update_env_param import UpdateEnvParam -from saasus_sdk_python.models.update_identity_provider_param import UpdateIdentityProviderParam -from saasus_sdk_python.models.update_notification_messages_param import UpdateNotificationMessagesParam -from saasus_sdk_python.models.update_saas_user_email_param import UpdateSaasUserEmailParam -from saasus_sdk_python.models.update_saas_user_password_param import UpdateSaasUserPasswordParam -from saasus_sdk_python.models.update_sign_in_settings_param import UpdateSignInSettingsParam -from saasus_sdk_python.models.update_software_token_param import UpdateSoftwareTokenParam -from saasus_sdk_python.models.update_tenant_user_param import UpdateTenantUserParam -from saasus_sdk_python.models.user import User -from saasus_sdk_python.models.user_attributes import UserAttributes -from saasus_sdk_python.models.user_available_env import UserAvailableEnv -from saasus_sdk_python.models.user_available_tenant import UserAvailableTenant -from saasus_sdk_python.models.user_info import UserInfo -from saasus_sdk_python.models.users import Users diff --git a/saasus_sdk_python/__main__.py b/saasus_sdk_python/__main__.py new file mode 100644 index 0000000..ea1c88b --- /dev/null +++ b/saasus_sdk_python/__main__.py @@ -0,0 +1,156 @@ +import uvicorn +from typing import Union +from fastapi import FastAPI, Request, Depends, HTTPException +from starlette.middleware.cors import CORSMiddleware + +from saasus_sdk_python.src.auth import TenantUserApi, BasicInfoApi +from saasus_sdk_python.src.pricing import PricingUnitsApi +from saasus_sdk_python.src.billing import StripeApi +from saasus_sdk_python.src.awsmarketplace import AwsMarketplaceApi +from saasus_sdk_python.src.integration import EventBridgeApi +from saasus_sdk_python.src.apilog import ApiLogApi +from saasus_sdk_python.src.communication import FeedbackApi +from saasus_sdk_python.callback.callback import Callback +from saasus_sdk_python.middleware.middleware import Authenticate +from saasus_sdk_python.client.auth_client import SignedAuthApiClient +from saasus_sdk_python.client.pricing_client import SignedPricingApiClient +from saasus_sdk_python.client.billing_client import SignedBillingApiClient +from saasus_sdk_python.client.awsmarketplace_client import SignedAwsmarketplaceApiClient +from saasus_sdk_python.client.integration_client import SignedIntegrationApiClient +from saasus_sdk_python.client.apilog_client import SignedApilogApiClient +from saasus_sdk_python.client.communication_client import SignedCommunicationApiClient + +from dotenv import load_dotenv + +load_dotenv() +app = FastAPI() +auth = Authenticate() +callback = Callback() +# ApiClientを継承したSignedApiClientを使う +auth_api_client = SignedAuthApiClient() +pricing_api_client = SignedPricingApiClient() +billing_api_client = SignedBillingApiClient() +awsmarketplace_api_client = SignedAwsmarketplaceApiClient() +integration_api_client = SignedIntegrationApiClient() +apilog_api_client = SignedApilogApiClient() +communication_api_client = SignedCommunicationApiClient() + +app.add_middleware( + CORSMiddleware, + allow_origins=["http://localhost:3000"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +# FastAPI用の認証メソッド +def fastapi_auth(request: Request) -> Union[dict, HTTPException]: + auth_header = request.headers.get("Authorization", "") + token = auth_header.replace("Bearer ", "") if "Bearer " in auth_header else "" + referer = request.headers.get("Referer", "") + user_info, error = auth.authenticate(id_token=token, referer=referer) + if error: + raise HTTPException(status_code=401, detail=str(error)) + return user_info + + +# 一時コードを取得する +def get_temp_code(request: Request): + code = request.query_params.get("code") + if not code: + raise HTTPException(status_code=400, detail="code is not provided by query parameter") + return code + + +# refresh tokenを取得する +def get_refresh_token(request: Request): + refresh_token = request.query_params.get("refreshtoken") + if not refresh_token: + raise HTTPException(status_code=400, detail="refresh_token is not provided by query parameter") + return refresh_token + + +@app.get("/credentials") +def get_credentials(request: Request): + return callback.callback_route_function(get_temp_code(request)) + + +@app.get("/userinfo") +def get_user_info(user_info: dict = Depends(fastapi_auth)): + return user_info + + +@app.get("/users") +def get_tenant_users(auth_user: dict = Depends(fastapi_auth)): + if not auth_user.tenants: + raise HTTPException(status_code=400, detail="No tenants found for the user") + + tenant_id = auth_user.tenants[0].id + + try: + tenant_user_info = TenantUserApi(api_client=auth_api_client).get_tenant_users(tenant_id=tenant_id, + _headers=auth_api_client.configuration.default_headers) + return tenant_user_info.users + + except Exception as e: + raise HTTPException(status_code=500, detail=str(e)) + + +@app.get("/refresh") +def get_refresh(request: Request): + return callback.get_refresh_token_auth_credentials(get_refresh_token(request)) + + +@app.get("/basic-info") +def get_basic_info(): + basic_info = BasicInfoApi(api_client=auth_api_client).get_basic_info( + _headers=auth_api_client.configuration.default_headers) + return basic_info + + +@app.get("/units") +def get_pricing_units(): + pricing_units = PricingUnitsApi(api_client=pricing_api_client).get_pricing_units( + _headers=pricing_api_client.configuration.default_headers) + return pricing_units + + +@app.get("/stripe/info") +def get_stripe_info(): + stripe_info = StripeApi(api_client=billing_api_client).get_stripe_info( + _headers=billing_api_client.configuration.default_headers) + return stripe_info + + +@app.get("/settings") +def get_settings(): + settings = AwsMarketplaceApi(api_client=awsmarketplace_api_client).get_settings( + _headers=awsmarketplace_api_client.configuration.default_headers) + return settings + + +@app.get("/eventbridge/info") +def event_bridge_info(): + # TODO うまく動いていないのでなおす + event_bridge_settings = EventBridgeApi(api_client=integration_api_client).get_event_bridge_settings( + _headers=integration_api_client.configuration.default_headers) + return event_bridge_settings + + +@app.get("/logs") +def get_apilogs(): + logs = ApiLogApi(api_client=apilog_api_client).get_logs( + _headers=apilog_api_client.configuration.default_headers) + return logs + + +@app.get("/feedbacks") +def get_feedbacks(): + feedbacks = FeedbackApi(api_client=communication_api_client).get_feedbacks( + _headers=communication_api_client.configuration.default_headers) + return feedbacks + + +if __name__ == "__main__": + uvicorn.run(app, host="0.0.0.0", port=80) diff --git a/saasus_sdk_python/api/__init__.py b/saasus_sdk_python/api/__init__.py deleted file mode 100644 index bfd5e73..0000000 --- a/saasus_sdk_python/api/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# flake8: noqa - -# import apis into api package -from saasus_sdk_python.api.auth_info_api import AuthInfoApi -from saasus_sdk_python.api.basic_info_api import BasicInfoApi -from saasus_sdk_python.api.credential_api import CredentialApi -from saasus_sdk_python.api.env_api import EnvApi -from saasus_sdk_python.api.error_api import ErrorApi -from saasus_sdk_python.api.role_api import RoleApi -from saasus_sdk_python.api.saas_user_api import SaasUserApi -from saasus_sdk_python.api.saasus_tenant_api import SaasusTenantApi -from saasus_sdk_python.api.tenant_api import TenantApi -from saasus_sdk_python.api.tenant_attribute_api import TenantAttributeApi -from saasus_sdk_python.api.tenant_user_api import TenantUserApi -from saasus_sdk_python.api.user_attribute_api import UserAttributeApi -from saasus_sdk_python.api.user_info_api import UserInfoApi - diff --git a/saasus_sdk_python/api/auth_info_api.py b/saasus_sdk_python/api/auth_info_api.py deleted file mode 100644 index a4760b5..0000000 --- a/saasus_sdk_python/api/auth_info_api.py +++ /dev/null @@ -1,876 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from typing import Optional - -from saasus_sdk_python.models.auth_info import AuthInfo -from saasus_sdk_python.models.identity_providers import IdentityProviders -from saasus_sdk_python.models.sign_in_settings import SignInSettings -from saasus_sdk_python.models.update_identity_provider_param import UpdateIdentityProviderParam -from saasus_sdk_python.models.update_sign_in_settings_param import UpdateSignInSettingsParam - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class AuthInfoApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_auth_info(self, **kwargs) -> AuthInfo: # noqa: E501 - """認証情報を取得(Get Authentication Info) # noqa: E501 - - ログイン後に認証情報を渡す SaaS の URL を取得します。 ここで取得した URL へ認証情報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。 Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_auth_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AuthInfo - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_auth_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_auth_info_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_auth_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """認証情報を取得(Get Authentication Info) # noqa: E501 - - ログイン後に認証情報を渡す SaaS の URL を取得します。 ここで取得した URL へ認証情報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。 Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_auth_info_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AuthInfo, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_auth_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "AuthInfo", - '500': "Error", - } - - return self.api_client.call_api( - '/auth-info', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_identity_providers(self, **kwargs) -> IdentityProviders: # noqa: E501 - """get_identity_providers # noqa: E501 - - cognitoに設定している外部プロバイダ経由のサインイン情報取得 Get sign-in information via external provider set in cognito # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_identity_providers(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: IdentityProviders - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_identity_providers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_identity_providers_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_identity_providers_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """get_identity_providers # noqa: E501 - - cognitoに設定している外部プロバイダ経由のサインイン情報取得 Get sign-in information via external provider set in cognito # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_identity_providers_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(IdentityProviders, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_identity_providers" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "IdentityProviders", - '500': "Error", - } - - return self.api_client.call_api( - '/identity-providers', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_sign_in_settings(self, **kwargs) -> SignInSettings: # noqa: E501 - """パスワード要件を取得(Get Password Requirements) # noqa: E501 - - ユーザーパスワードの要件設定を取得します。 アルファベット、数字、記号の組み合わせで、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります。 Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_sign_in_settings(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SignInSettings - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_sign_in_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_sign_in_settings_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_sign_in_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """パスワード要件を取得(Get Password Requirements) # noqa: E501 - - ユーザーパスワードの要件設定を取得します。 アルファベット、数字、記号の組み合わせで、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります。 Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_sign_in_settings_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SignInSettings, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_sign_in_settings" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "SignInSettings", - '500': "Error", - } - - return self.api_client.call_api( - '/sign-in-settings', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_auth_info(self, body : Optional[AuthInfo] = None, **kwargs) -> None: # noqa: E501 - """認証情報を更新(Update Authentication Info) # noqa: E501 - - ログイン後に認証情報を渡す SaaS の URL を登録します。 ここで登録した URL に認証情報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。 Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_auth_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: AuthInfo - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_auth_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_auth_info_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def update_auth_info_with_http_info(self, body : Optional[AuthInfo] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証情報を更新(Update Authentication Info) # noqa: E501 - - ログイン後に認証情報を渡す SaaS の URL を登録します。 ここで登録した URL に認証情報を渡し、SaaSus SDK を利用してこの Callback の実装をすることが可能となります。 Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_auth_info_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: AuthInfo - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_auth_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/auth-info', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_identity_provider(self, update_identity_provider_param : Optional[UpdateIdentityProviderParam] = None, **kwargs) -> None: # noqa: E501 - """update_identity_provider # noqa: E501 - - 外部IDプロバイダのサインイン情報更新 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_identity_provider(update_identity_provider_param, async_req=True) - >>> result = thread.get() - - :param update_identity_provider_param: - :type update_identity_provider_param: UpdateIdentityProviderParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_identity_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_identity_provider_with_http_info(update_identity_provider_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_identity_provider_with_http_info(self, update_identity_provider_param : Optional[UpdateIdentityProviderParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """update_identity_provider # noqa: E501 - - 外部IDプロバイダのサインイン情報更新 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_identity_provider_with_http_info(update_identity_provider_param, async_req=True) - >>> result = thread.get() - - :param update_identity_provider_param: - :type update_identity_provider_param: UpdateIdentityProviderParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'update_identity_provider_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_identity_provider" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_identity_provider_param'] is not None: - _body_params = _params['update_identity_provider_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/identity-providers', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_sign_in_settings(self, update_sign_in_settings_param : Optional[UpdateSignInSettingsParam] = None, **kwargs) -> None: # noqa: E501 - """パスワード要件を更新(Update Password Requirements) # noqa: E501 - - ユーザーパスワードの要件設定を更新します。 アルファベット、数字、記号の組み合わせで、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります。 Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_sign_in_settings(update_sign_in_settings_param, async_req=True) - >>> result = thread.get() - - :param update_sign_in_settings_param: - :type update_sign_in_settings_param: UpdateSignInSettingsParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_sign_in_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_sign_in_settings_with_http_info(update_sign_in_settings_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_sign_in_settings_with_http_info(self, update_sign_in_settings_param : Optional[UpdateSignInSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """パスワード要件を更新(Update Password Requirements) # noqa: E501 - - ユーザーパスワードの要件設定を更新します。 アルファベット、数字、記号の組み合わせで、桁数を長くすれば解読されづらい安全なパスワードを設定することが可能となります。 Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_sign_in_settings_with_http_info(update_sign_in_settings_param, async_req=True) - >>> result = thread.get() - - :param update_sign_in_settings_param: - :type update_sign_in_settings_param: UpdateSignInSettingsParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'update_sign_in_settings_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_sign_in_settings" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_sign_in_settings_param'] is not None: - _body_params = _params['update_sign_in_settings_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/sign-in-settings', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/basic_info_api.py b/saasus_sdk_python/api/basic_info_api.py deleted file mode 100644 index 6146679..0000000 --- a/saasus_sdk_python/api/basic_info_api.py +++ /dev/null @@ -1,1155 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from typing import Optional - -from saasus_sdk_python.models.basic_info import BasicInfo -from saasus_sdk_python.models.customize_page_settings import CustomizePageSettings -from saasus_sdk_python.models.customize_pages import CustomizePages -from saasus_sdk_python.models.notification_messages import NotificationMessages -from saasus_sdk_python.models.update_basic_info_param import UpdateBasicInfoParam -from saasus_sdk_python.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam -from saasus_sdk_python.models.update_customize_pages_param import UpdateCustomizePagesParam -from saasus_sdk_python.models.update_notification_messages_param import UpdateNotificationMessagesParam - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class BasicInfoApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def find_notification_messages(self, **kwargs) -> NotificationMessages: # noqa: E501 - """通知メールテンプレートを取得(Get Notification Email Templates) # noqa: E501 - - 各種通知メールテンプレートを取得します。 Get notification email templates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_notification_messages(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NotificationMessages - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the find_notification_messages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.find_notification_messages_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def find_notification_messages_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """通知メールテンプレートを取得(Get Notification Email Templates) # noqa: E501 - - 各種通知メールテンプレートを取得します。 Get notification email templates. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_notification_messages_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NotificationMessages, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method find_notification_messages" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "NotificationMessages", - '500': "Error", - } - - return self.api_client.call_api( - '/notification-messages', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_basic_info(self, **kwargs) -> BasicInfo: # noqa: E501 - """基本設定情報の取得(Get Basic Configurations) # noqa: E501 - - SaaS ID を元に設定されているドメイン名と CNAME レコードを取得します。 取得した CNAME レコードを DNS に設定することで、ログイン画面を生成します。 Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_basic_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: BasicInfo - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_basic_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_basic_info_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_basic_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """基本設定情報の取得(Get Basic Configurations) # noqa: E501 - - SaaS ID を元に設定されているドメイン名と CNAME レコードを取得します。 取得した CNAME レコードを DNS に設定することで、ログイン画面を生成します。 Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_basic_info_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(BasicInfo, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_basic_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "BasicInfo", - '500': "Error", - } - - return self.api_client.call_api( - '/basic-info', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_customize_page_settings(self, **kwargs) -> CustomizePageSettings: # noqa: E501 - """認証認可基本情報取得(Get Authentication Authorization Basic Information) # noqa: E501 - - 認証認可基本情報を取得します。 Get authentication authorization basic information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_customize_page_settings(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: CustomizePageSettings - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_customize_page_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_customize_page_settings_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_customize_page_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """認証認可基本情報取得(Get Authentication Authorization Basic Information) # noqa: E501 - - 認証認可基本情報を取得します。 Get authentication authorization basic information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_customize_page_settings_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(CustomizePageSettings, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_customize_page_settings" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "CustomizePageSettings", - '500': "Error", - } - - return self.api_client.call_api( - '/customize-page-settings', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_customize_pages(self, **kwargs) -> CustomizePages: # noqa: E501 - """認証系画面設定情報取得(Get Authentication Page Setting) # noqa: E501 - - 認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を取得します。 Get the authentication screen setting information (new registration, login, password reset, etc.). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_customize_pages(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: CustomizePages - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_customize_pages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_customize_pages_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_customize_pages_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """認証系画面設定情報取得(Get Authentication Page Setting) # noqa: E501 - - 認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を取得します。 Get the authentication screen setting information (new registration, login, password reset, etc.). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_customize_pages_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(CustomizePages, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_customize_pages" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "CustomizePages", - '500': "Error", - } - - return self.api_client.call_api( - '/customize-pages', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_basic_info(self, update_basic_info_param : Optional[UpdateBasicInfoParam] = None, **kwargs) -> None: # noqa: E501 - """基本設定情報の更新(Update Basic Configurations) # noqa: E501 - - SaaS ID を元にパラメータとして設定したドメイン名を設定更新します。 CNAME レコードが生成されますので、 DNS に設定して下さい。 既に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。 Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_basic_info(update_basic_info_param, async_req=True) - >>> result = thread.get() - - :param update_basic_info_param: - :type update_basic_info_param: UpdateBasicInfoParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_basic_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_basic_info_with_http_info(update_basic_info_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_basic_info_with_http_info(self, update_basic_info_param : Optional[UpdateBasicInfoParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """基本設定情報の更新(Update Basic Configurations) # noqa: E501 - - SaaS ID を元にパラメータとして設定したドメイン名を設定更新します。 CNAME レコードが生成されますので、 DNS に設定して下さい。 既に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。 Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_basic_info_with_http_info(update_basic_info_param, async_req=True) - >>> result = thread.get() - - :param update_basic_info_param: - :type update_basic_info_param: UpdateBasicInfoParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'update_basic_info_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_basic_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_basic_info_param'] is not None: - _body_params = _params['update_basic_info_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/basic-info', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_customize_page_settings(self, update_customize_page_settings_param : Optional[UpdateCustomizePageSettingsParam] = None, **kwargs) -> None: # noqa: E501 - """認証認可基本情報更新(Update Authentication Authorization Basic Information) # noqa: E501 - - 認証認可基本情報を更新します。 Update authentication authorization basic information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_customize_page_settings(update_customize_page_settings_param, async_req=True) - >>> result = thread.get() - - :param update_customize_page_settings_param: - :type update_customize_page_settings_param: UpdateCustomizePageSettingsParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_customize_page_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_customize_page_settings_with_http_info(update_customize_page_settings_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_customize_page_settings_with_http_info(self, update_customize_page_settings_param : Optional[UpdateCustomizePageSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証認可基本情報更新(Update Authentication Authorization Basic Information) # noqa: E501 - - 認証認可基本情報を更新します。 Update authentication authorization basic information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_customize_page_settings_with_http_info(update_customize_page_settings_param, async_req=True) - >>> result = thread.get() - - :param update_customize_page_settings_param: - :type update_customize_page_settings_param: UpdateCustomizePageSettingsParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'update_customize_page_settings_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_customize_page_settings" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_customize_page_settings_param'] is not None: - _body_params = _params['update_customize_page_settings_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/customize-page-settings', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_customize_pages(self, update_customize_pages_param : Optional[UpdateCustomizePagesParam] = None, **kwargs) -> None: # noqa: E501 - """認証系画面設定情報設定(Authentication Page Setting) # noqa: E501 - - 認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を更新します。 Update the authentication page setting information (new registration, login, password reset, etc.). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_customize_pages(update_customize_pages_param, async_req=True) - >>> result = thread.get() - - :param update_customize_pages_param: - :type update_customize_pages_param: UpdateCustomizePagesParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_customize_pages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_customize_pages_with_http_info(update_customize_pages_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_customize_pages_with_http_info(self, update_customize_pages_param : Optional[UpdateCustomizePagesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証系画面設定情報設定(Authentication Page Setting) # noqa: E501 - - 認証系画面設定情報(新規登録・ログイン・パスワードリセット等)を更新します。 Update the authentication page setting information (new registration, login, password reset, etc.). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_customize_pages_with_http_info(update_customize_pages_param, async_req=True) - >>> result = thread.get() - - :param update_customize_pages_param: - :type update_customize_pages_param: UpdateCustomizePagesParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'update_customize_pages_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_customize_pages" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_customize_pages_param'] is not None: - _body_params = _params['update_customize_pages_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/customize-pages', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_notification_messages(self, update_notification_messages_param : Optional[UpdateNotificationMessagesParam] = None, **kwargs) -> None: # noqa: E501 - """通知メールテンプレートを更新(Update Notification Email Template) # noqa: E501 - - 各種通知メールテンプレート更新します。 Update notification email template. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_notification_messages(update_notification_messages_param, async_req=True) - >>> result = thread.get() - - :param update_notification_messages_param: - :type update_notification_messages_param: UpdateNotificationMessagesParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_notification_messages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_notification_messages_with_http_info(update_notification_messages_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_notification_messages_with_http_info(self, update_notification_messages_param : Optional[UpdateNotificationMessagesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """通知メールテンプレートを更新(Update Notification Email Template) # noqa: E501 - - 各種通知メールテンプレート更新します。 Update notification email template. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_notification_messages_with_http_info(update_notification_messages_param, async_req=True) - >>> result = thread.get() - - :param update_notification_messages_param: - :type update_notification_messages_param: UpdateNotificationMessagesParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'update_notification_messages_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_notification_messages" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_notification_messages_param'] is not None: - _body_params = _params['update_notification_messages_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/notification-messages', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/credential_api.py b/saasus_sdk_python/api/credential_api.py deleted file mode 100644 index 56ed5ad..0000000 --- a/saasus_sdk_python/api/credential_api.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.authorization_temp_code import AuthorizationTempCode -from saasus_sdk_python.models.credentials import Credentials - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class CredentialApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_auth_credentials(self, body : Optional[Credentials] = None, **kwargs) -> AuthorizationTempCode: # noqa: E501 - """認証・認可情報の保存(Save Authentication/Authorization Information) # noqa: E501 - - 引数のIDトークン・アクセストークン・リフレッシュトークンを一時保存し取得用の一時コードを返却する。 一時コードの有効期間は発行から10秒です。 Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_auth_credentials(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Credentials - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AuthorizationTempCode - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_auth_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_auth_credentials_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def create_auth_credentials_with_http_info(self, body : Optional[Credentials] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証・認可情報の保存(Save Authentication/Authorization Information) # noqa: E501 - - 引数のIDトークン・アクセストークン・リフレッシュトークンを一時保存し取得用の一時コードを返却する。 一時コードの有効期間は発行から10秒です。 Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_auth_credentials_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Credentials - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AuthorizationTempCode, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_auth_credentials" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "AuthorizationTempCode", - '400': "Error", - '401': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/credentials', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_auth_credentials(self, code : Annotated[Optional[StrictStr], Field(description="一時コード(Temp Code)")] = None, auth_flow : Annotated[Optional[StrictStr], Field(description="認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得 指定されていない場合は tempCodeAuth になります ")] = None, refresh_token : Annotated[Optional[StrictStr], Field(description="リフレッシュトークン(Refresh Token)")] = None, **kwargs) -> Credentials: # noqa: E501 - """認証・認可情報の取得(Get Authentication/Authorization Information) # noqa: E501 - - 一時コードまたはリフレッシュトークンを利用してIDトークン・アクセストークン・リフレッシュトークンを取得する。 Get ID token, access token, and refresh token using a temporary code or a refresh token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_auth_credentials(code, auth_flow, refresh_token, async_req=True) - >>> result = thread.get() - - :param code: 一時コード(Temp Code) - :type code: str - :param auth_flow: 認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得 指定されていない場合は tempCodeAuth になります - :type auth_flow: str - :param refresh_token: リフレッシュトークン(Refresh Token) - :type refresh_token: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Credentials - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_auth_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_auth_credentials_with_http_info(code, auth_flow, refresh_token, **kwargs) # noqa: E501 - - @validate_arguments - def get_auth_credentials_with_http_info(self, code : Annotated[Optional[StrictStr], Field(description="一時コード(Temp Code)")] = None, auth_flow : Annotated[Optional[StrictStr], Field(description="認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得 指定されていない場合は tempCodeAuth になります ")] = None, refresh_token : Annotated[Optional[StrictStr], Field(description="リフレッシュトークン(Refresh Token)")] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証・認可情報の取得(Get Authentication/Authorization Information) # noqa: E501 - - 一時コードまたはリフレッシュトークンを利用してIDトークン・アクセストークン・リフレッシュトークンを取得する。 Get ID token, access token, and refresh token using a temporary code or a refresh token. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_auth_credentials_with_http_info(code, auth_flow, refresh_token, async_req=True) - >>> result = thread.get() - - :param code: 一時コード(Temp Code) - :type code: str - :param auth_flow: 認証フロー(Authentication Flow) tempCodeAuth: 一時コードを利用した認証情報の取得 refreshTokenAuth: リフレッシュトークンを利用した認証情報の取得 指定されていない場合は tempCodeAuth になります - :type auth_flow: str - :param refresh_token: リフレッシュトークン(Refresh Token) - :type refresh_token: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Credentials, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'code', - 'auth_flow', - 'refresh_token' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_auth_credentials" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('code') is not None: # noqa: E501 - _query_params.append(('code', _params['code'])) - - if _params.get('auth_flow') is not None: # noqa: E501 - _query_params.append(('auth-flow', _params['auth_flow'])) - - if _params.get('refresh_token') is not None: # noqa: E501 - _query_params.append(('refresh-token', _params['refresh_token'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Credentials", - '404': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/credentials', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/env_api.py b/saasus_sdk_python/api/env_api.py deleted file mode 100644 index 1f0a838..0000000 --- a/saasus_sdk_python/api/env_api.py +++ /dev/null @@ -1,757 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictInt - -from typing import Optional - -from saasus_sdk_python.models.env import Env -from saasus_sdk_python.models.envs import Envs -from saasus_sdk_python.models.update_env_param import UpdateEnvParam - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class EnvApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_env(self, body : Optional[Env] = None, **kwargs) -> Env: # noqa: E501 - """環境情報を作成(Create Env Info) # noqa: E501 - - 環境情報を作成します。 連携のテストや開発用環境や実際の運用で利用する環境など複数の環境を定義することができます。 Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_env(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Env - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Env - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_env_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def create_env_with_http_info(self, body : Optional[Env] = None, **kwargs) -> ApiResponse: # noqa: E501 - """環境情報を作成(Create Env Info) # noqa: E501 - - 環境情報を作成します。 連携のテストや開発用環境や実際の運用で利用する環境など複数の環境を定義することができます。 Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_env_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Env - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Env, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_env" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "Env", - '500': "Error", - } - - return self.api_client.call_api( - '/envs', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_env(self, env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], **kwargs) -> None: # noqa: E501 - """環境情報を削除(Delete Env Info) # noqa: E501 - - 環境情報を削除します。 Delete env info. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_env(env_id, async_req=True) - >>> result = thread.get() - - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_env_with_http_info(env_id, **kwargs) # noqa: E501 - - @validate_arguments - def delete_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """環境情報を削除(Delete Env Info) # noqa: E501 - - 環境情報を削除します。 Delete env info. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_env_with_http_info(env_id, async_req=True) - >>> result = thread.get() - - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'env_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_env" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['env_id']: - _path_params['env_id'] = _params['env_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/envs/{env_id}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_env(self, env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], **kwargs) -> Env: # noqa: E501 - """環境情報を取得(Get Env Details) # noqa: E501 - - 環境情報の詳細を取得します。 Get environment details. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_env(env_id, async_req=True) - >>> result = thread.get() - - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Env - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_env_with_http_info(env_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """環境情報を取得(Get Env Details) # noqa: E501 - - 環境情報の詳細を取得します。 Get environment details. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_env_with_http_info(env_id, async_req=True) - >>> result = thread.get() - - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Env, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'env_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_env" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['env_id']: - _path_params['env_id'] = _params['env_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Env", - '404': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/envs/{env_id}', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_envs(self, **kwargs) -> Envs: # noqa: E501 - """環境情報一覧を取得(Get Env Info) # noqa: E501 - - 登録されている環境情報を取得します。 連携のテストや開発用環境や実際の運用で利用する環境など複数の環境を定義することができます。 Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_envs(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Envs - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_envs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_envs_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_envs_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """環境情報一覧を取得(Get Env Info) # noqa: E501 - - 登録されている環境情報を取得します。 連携のテストや開発用環境や実際の運用で利用する環境など複数の環境を定義することができます。 Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_envs_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Envs, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_envs" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Envs", - '500': "Error", - } - - return self.api_client.call_api( - '/envs', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_env(self, env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], update_env_param : Optional[UpdateEnvParam] = None, **kwargs) -> None: # noqa: E501 - """環境情報を更新(Update Env Info) # noqa: E501 - - 環境情報を更新します。 Update env info. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_env(env_id, update_env_param, async_req=True) - >>> result = thread.get() - - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param update_env_param: - :type update_env_param: UpdateEnvParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_env_with_http_info(env_id, update_env_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], update_env_param : Optional[UpdateEnvParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """環境情報を更新(Update Env Info) # noqa: E501 - - 環境情報を更新します。 Update env info. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_env_with_http_info(env_id, update_env_param, async_req=True) - >>> result = thread.get() - - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param update_env_param: - :type update_env_param: UpdateEnvParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'env_id', - 'update_env_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_env" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['env_id']: - _path_params['env_id'] = _params['env_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_env_param'] is not None: - _body_params = _params['update_env_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/envs/{env_id}', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/error_api.py b/saasus_sdk_python/api/error_api.py deleted file mode 100644 index bc465c2..0000000 --- a/saasus_sdk_python/api/error_api.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class ErrorApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 - """ステータスコード500でサーバーエラーを返却(Return Internal Server Error) # noqa: E501 - - テスト用途で使用するエンドポイントです。ステータスコード500でサーバーエラーを返却します。 This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.return_internal_server_error(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """ステータスコード500でサーバーエラーを返却(Return Internal Server Error) # noqa: E501 - - テスト用途で使用するエンドポイントです。ステータスコード500でサーバーエラーを返却します。 This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.return_internal_server_error_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method return_internal_server_error" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/errors/internal-server-error', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/role_api.py b/saasus_sdk_python/api/role_api.py deleted file mode 100644 index e96835c..0000000 --- a/saasus_sdk_python/api/role_api.py +++ /dev/null @@ -1,463 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.role import Role -from saasus_sdk_python.models.roles import Roles - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class RoleApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_role(self, body : Optional[Role] = None, **kwargs) -> Role: # noqa: E501 - """役割(ロール)を作成(Create Role) # noqa: E501 - - 役割(ロール)を作成します。 ここで作成した役割をユーザーに付与することによって、SaaS側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可能です。 Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_role(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Role - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Role - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_role_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def create_role_with_http_info(self, body : Optional[Role] = None, **kwargs) -> ApiResponse: # noqa: E501 - """役割(ロール)を作成(Create Role) # noqa: E501 - - 役割(ロール)を作成します。 ここで作成した役割をユーザーに付与することによって、SaaS側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可能です。 Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_role_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Role - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Role, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_role" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "Role", - '500': "Error", - } - - return self.api_client.call_api( - '/roles', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_role(self, role_name : Annotated[StrictStr, Field(..., description="役割(ロール)名(role name)")], **kwargs) -> None: # noqa: E501 - """役割(ロール)を削除(Delete Role) # noqa: E501 - - 役割(ロール)を削除します。 Delete role. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_role(role_name, async_req=True) - >>> result = thread.get() - - :param role_name: 役割(ロール)名(role name) (required) - :type role_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_role_with_http_info(role_name, **kwargs) # noqa: E501 - - @validate_arguments - def delete_role_with_http_info(self, role_name : Annotated[StrictStr, Field(..., description="役割(ロール)名(role name)")], **kwargs) -> ApiResponse: # noqa: E501 - """役割(ロール)を削除(Delete Role) # noqa: E501 - - 役割(ロール)を削除します。 Delete role. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_role_with_http_info(role_name, async_req=True) - >>> result = thread.get() - - :param role_name: 役割(ロール)名(role name) (required) - :type role_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'role_name' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_role" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['role_name']: - _path_params['role_name'] = _params['role_name'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/roles/{role_name}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_roles(self, **kwargs) -> Roles: # noqa: E501 - """役割(ロール)一覧を取得(Get Roles) # noqa: E501 - - 登録されている役割(ロール)を一覧として取得します。 ここで定義した役割をユーザーに付与することによって、SaaS側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可能です。 Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_roles(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Roles - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_roles_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_roles_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """役割(ロール)一覧を取得(Get Roles) # noqa: E501 - - 登録されている役割(ロール)を一覧として取得します。 ここで定義した役割をユーザーに付与することによって、SaaS側で役割ベースの認可を実装することが用意になります。 また、同じユーザーでも、属するテナント・環境ごとに持っている役割を変えることが可能です。 Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_roles_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Roles, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_roles" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Roles", - '500': "Error", - } - - return self.api_client.call_api( - '/roles', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/saas_user_api.py b/saasus_sdk_python/api/saas_user_api.py deleted file mode 100644 index fc8ab63..0000000 --- a/saasus_sdk_python/api/saas_user_api.py +++ /dev/null @@ -1,2391 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.create_saas_user_param import CreateSaasUserParam -from saasus_sdk_python.models.create_secret_code_param import CreateSecretCodeParam -from saasus_sdk_python.models.link_aws_marketplace_param import LinkAwsMarketplaceParam -from saasus_sdk_python.models.mfa_preference import MfaPreference -from saasus_sdk_python.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.models.saas_users import SaasUsers -from saasus_sdk_python.models.sign_up_param import SignUpParam -from saasus_sdk_python.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.software_token_secret_code import SoftwareTokenSecretCode -from saasus_sdk_python.models.tenant import Tenant -from saasus_sdk_python.models.update_saas_user_email_param import UpdateSaasUserEmailParam -from saasus_sdk_python.models.update_saas_user_password_param import UpdateSaasUserPasswordParam -from saasus_sdk_python.models.update_software_token_param import UpdateSoftwareTokenParam - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class SaasUserApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def confirm_sign_up_with_aws_marketplace(self, confirm_sign_up_with_aws_marketplace_param : Optional[ConfirmSignUpWithAwsMarketplaceParam] = None, **kwargs) -> Tenant: # noqa: E501 - """AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace) # noqa: E501 - - AWS Marketplaceと連携したユーザー新規登録を確定します。AWS Marketplaceと連携したテナントを新規作成します。 Registration Tokenが有効でない場合はエラーを返却します。 Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param, async_req=True) - >>> result = thread.get() - - :param confirm_sign_up_with_aws_marketplace_param: - :type confirm_sign_up_with_aws_marketplace_param: ConfirmSignUpWithAwsMarketplaceParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Tenant - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the confirm_sign_up_with_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.confirm_sign_up_with_aws_marketplace_with_http_info(confirm_sign_up_with_aws_marketplace_param, **kwargs) # noqa: E501 - - @validate_arguments - def confirm_sign_up_with_aws_marketplace_with_http_info(self, confirm_sign_up_with_aws_marketplace_param : Optional[ConfirmSignUpWithAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """AWS Marketplaceによるユーザー新規登録の確定(Confirm Sign Up with AWS Marketplace) # noqa: E501 - - AWS Marketplaceと連携したユーザー新規登録を確定します。AWS Marketplaceと連携したテナントを新規作成します。 Registration Tokenが有効でない場合はエラーを返却します。 Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.confirm_sign_up_with_aws_marketplace_with_http_info(confirm_sign_up_with_aws_marketplace_param, async_req=True) - >>> result = thread.get() - - :param confirm_sign_up_with_aws_marketplace_param: - :type confirm_sign_up_with_aws_marketplace_param: ConfirmSignUpWithAwsMarketplaceParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Tenant, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'confirm_sign_up_with_aws_marketplace_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method confirm_sign_up_with_aws_marketplace" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['confirm_sign_up_with_aws_marketplace_param'] is not None: - _body_params = _params['confirm_sign_up_with_aws_marketplace_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "Tenant", - '500': "Error", - } - - return self.api_client.call_api( - '/aws-marketplace/sign-up-confirm', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> SaasUser: # noqa: E501 - """SaaSにユーザーを作成(Create SaaS User) # noqa: E501 - - SaaSにユーザーを作成します。 Create SaaS User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_saas_user(create_saas_user_param, async_req=True) - >>> result = thread.get() - - :param create_saas_user_param: - :type create_saas_user_param: CreateSaasUserParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SaasUser - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_saas_user_with_http_info(create_saas_user_param, **kwargs) # noqa: E501 - - @validate_arguments - def create_saas_user_with_http_info(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """SaaSにユーザーを作成(Create SaaS User) # noqa: E501 - - SaaSにユーザーを作成します。 Create SaaS User. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_saas_user_with_http_info(create_saas_user_param, async_req=True) - >>> result = thread.get() - - :param create_saas_user_param: - :type create_saas_user_param: CreateSaasUserParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'create_saas_user_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_saas_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['create_saas_user_param'] is not None: - _body_params = _params['create_saas_user_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "SaasUser", - '400': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/users', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def create_secret_code(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], create_secret_code_param : Optional[CreateSecretCodeParam] = None, **kwargs) -> SoftwareTokenSecretCode: # noqa: E501 - """認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration) # noqa: E501 - - 認証アプリケーション登録用のシークレットコードを作成します。 Create a secret code for authentication application registration. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_secret_code(user_id, create_secret_code_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param create_secret_code_param: - :type create_secret_code_param: CreateSecretCodeParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SoftwareTokenSecretCode - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_secret_code_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_secret_code_with_http_info(user_id, create_secret_code_param, **kwargs) # noqa: E501 - - @validate_arguments - def create_secret_code_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], create_secret_code_param : Optional[CreateSecretCodeParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証アプリケーション登録用のシークレットコードを作成(Creates secret code for authentication application registration) # noqa: E501 - - 認証アプリケーション登録用のシークレットコードを作成します。 Create a secret code for authentication application registration. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_secret_code_with_http_info(user_id, create_secret_code_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param create_secret_code_param: - :type create_secret_code_param: CreateSecretCodeParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SoftwareTokenSecretCode, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'user_id', - 'create_secret_code_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_secret_code" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['create_secret_code_param'] is not None: - _body_params = _params['create_secret_code_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "SoftwareTokenSecretCode", - '500': "Error", - } - - return self.api_client.call_api( - '/users/{user_id}/mfa/software-token/secret-code', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_saas_user(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> None: # noqa: E501 - """ユーザー情報を削除(Delete User) # noqa: E501 - - ユーザーIDを元に一致するユーザーをテナントからすべて削除し、SaaSからも削除します。 Delete all users with matching user ID from the tenant and SaaS. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_saas_user(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_saas_user_with_http_info(user_id, **kwargs) # noqa: E501 - - @validate_arguments - def delete_saas_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー情報を削除(Delete User) # noqa: E501 - - ユーザーIDを元に一致するユーザーをテナントからすべて削除し、SaaSからも削除します。 Delete all users with matching user ID from the tenant and SaaS. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_saas_user_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_saas_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/users/{user_id}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_saas_user(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> SaasUser: # noqa: E501 - """ユーザー情報を取得(Get User) # noqa: E501 - - ユーザーIDからユーザー情報を取得します。 Get user information based on user ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_saas_user(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SaasUser - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_saas_user_with_http_info(user_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_saas_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー情報を取得(Get User) # noqa: E501 - - ユーザーIDからユーザー情報を取得します。 Get user information based on user ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_saas_user_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_saas_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "SaasUser", - '404': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/users/{user_id}', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_saas_users(self, **kwargs) -> SaasUsers: # noqa: E501 - """ユーザー一覧を取得(Get Users) # noqa: E501 - - SaaSのユーザー全件を取得します。 Get all SaaS users. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_saas_users(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SaasUsers - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_saas_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_saas_users_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_saas_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー一覧を取得(Get Users) # noqa: E501 - - SaaSのユーザー全件を取得します。 Get all SaaS users. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_saas_users_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SaasUsers, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_saas_users" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "SaasUsers", - '500': "Error", - } - - return self.api_client.call_api( - '/users', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_user_mfa_preference(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> MfaPreference: # noqa: E501 - """ユーザーのMFA設定を取得(Get User's MFA Settings) # noqa: E501 - - ユーザーのMFA設定を取得します。 Get the user's MFA settings. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_mfa_preference(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: MfaPreference - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_user_mfa_preference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_user_mfa_preference_with_http_info(user_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_user_mfa_preference_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """ユーザーのMFA設定を取得(Get User's MFA Settings) # noqa: E501 - - ユーザーのMFA設定を取得します。 Get the user's MFA settings. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_mfa_preference_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(MfaPreference, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_mfa_preference" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "MfaPreference", - '500': "Error", - } - - return self.api_client.call_api( - '/users/{user_id}/mfa/preference', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def link_aws_marketplace(self, link_aws_marketplace_param : Optional[LinkAwsMarketplaceParam] = None, **kwargs) -> None: # noqa: E501 - """AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace) # noqa: E501 - - AWS Marketplaceと既存のテナントを連携します。 Registration Tokenが有効でない場合はエラーを返却します。 Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.link_aws_marketplace(link_aws_marketplace_param, async_req=True) - >>> result = thread.get() - - :param link_aws_marketplace_param: - :type link_aws_marketplace_param: LinkAwsMarketplaceParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the link_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.link_aws_marketplace_with_http_info(link_aws_marketplace_param, **kwargs) # noqa: E501 - - @validate_arguments - def link_aws_marketplace_with_http_info(self, link_aws_marketplace_param : Optional[LinkAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """AWS Marketplaceと既存のテナントの連携(Link an existing tenant with AWS Marketplace) # noqa: E501 - - AWS Marketplaceと既存のテナントを連携します。 Registration Tokenが有効でない場合はエラーを返却します。 Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.link_aws_marketplace_with_http_info(link_aws_marketplace_param, async_req=True) - >>> result = thread.get() - - :param link_aws_marketplace_param: - :type link_aws_marketplace_param: LinkAwsMarketplaceParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'link_aws_marketplace_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method link_aws_marketplace" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['link_aws_marketplace_param'] is not None: - _body_params = _params['link_aws_marketplace_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/aws-marketplace/link', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def resend_sign_up_confirmation_email(self, resend_sign_up_confirmation_email_param : Optional[ResendSignUpConfirmationEmailParam] = None, **kwargs) -> None: # noqa: E501 - """新規登録時の確認メール再送信(Resend Sign Up Confirmation Email) # noqa: E501 - - 新規登録時の仮パスワードを再送信します。 Resend temporary password for the new registered user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param, async_req=True) - >>> result = thread.get() - - :param resend_sign_up_confirmation_email_param: - :type resend_sign_up_confirmation_email_param: ResendSignUpConfirmationEmailParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the resend_sign_up_confirmation_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.resend_sign_up_confirmation_email_with_http_info(resend_sign_up_confirmation_email_param, **kwargs) # noqa: E501 - - @validate_arguments - def resend_sign_up_confirmation_email_with_http_info(self, resend_sign_up_confirmation_email_param : Optional[ResendSignUpConfirmationEmailParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """新規登録時の確認メール再送信(Resend Sign Up Confirmation Email) # noqa: E501 - - 新規登録時の仮パスワードを再送信します。 Resend temporary password for the new registered user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.resend_sign_up_confirmation_email_with_http_info(resend_sign_up_confirmation_email_param, async_req=True) - >>> result = thread.get() - - :param resend_sign_up_confirmation_email_param: - :type resend_sign_up_confirmation_email_param: ResendSignUpConfirmationEmailParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'resend_sign_up_confirmation_email_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method resend_sign_up_confirmation_email" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['resend_sign_up_confirmation_email_param'] is not None: - _body_params = _params['resend_sign_up_confirmation_email_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/sign-up/resend', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def sign_up(self, sign_up_param : Optional[SignUpParam] = None, **kwargs) -> SaasUser: # noqa: E501 - """新規登録(Sign Up) # noqa: E501 - - ユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 Register a new user. A temporary password will be sent to the registered email. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.sign_up(sign_up_param, async_req=True) - >>> result = thread.get() - - :param sign_up_param: - :type sign_up_param: SignUpParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SaasUser - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the sign_up_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.sign_up_with_http_info(sign_up_param, **kwargs) # noqa: E501 - - @validate_arguments - def sign_up_with_http_info(self, sign_up_param : Optional[SignUpParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """新規登録(Sign Up) # noqa: E501 - - ユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 Register a new user. A temporary password will be sent to the registered email. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.sign_up_with_http_info(sign_up_param, async_req=True) - >>> result = thread.get() - - :param sign_up_param: - :type sign_up_param: SignUpParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'sign_up_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method sign_up" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['sign_up_param'] is not None: - _body_params = _params['sign_up_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "SaasUser", - '500': "Error", - } - - return self.api_client.call_api( - '/sign-up', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def sign_up_with_aws_marketplace(self, sign_up_with_aws_marketplace_param : Optional[SignUpWithAwsMarketplaceParam] = None, **kwargs) -> SaasUser: # noqa: E501 - """AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace) # noqa: E501 - - AWS Marketplaceと連携したユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 Registration Tokenが有効でない場合はエラーを返却します。 Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param, async_req=True) - >>> result = thread.get() - - :param sign_up_with_aws_marketplace_param: - :type sign_up_with_aws_marketplace_param: SignUpWithAwsMarketplaceParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SaasUser - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the sign_up_with_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.sign_up_with_aws_marketplace_with_http_info(sign_up_with_aws_marketplace_param, **kwargs) # noqa: E501 - - @validate_arguments - def sign_up_with_aws_marketplace_with_http_info(self, sign_up_with_aws_marketplace_param : Optional[SignUpWithAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """AWS Marketplaceによるユーザー新規登録(Sign Up with AWS Marketplace) # noqa: E501 - - AWS Marketplaceと連携したユーザーを新規登録します。登録されたメールアドレスに対して仮パスワードを送信します。 Registration Tokenが有効でない場合はエラーを返却します。 Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.sign_up_with_aws_marketplace_with_http_info(sign_up_with_aws_marketplace_param, async_req=True) - >>> result = thread.get() - - :param sign_up_with_aws_marketplace_param: - :type sign_up_with_aws_marketplace_param: SignUpWithAwsMarketplaceParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'sign_up_with_aws_marketplace_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method sign_up_with_aws_marketplace" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['sign_up_with_aws_marketplace_param'] is not None: - _body_params = _params['sign_up_with_aws_marketplace_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "SaasUser", - '500': "Error", - } - - return self.api_client.call_api( - '/aws-marketplace/sign-up', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def unlink_provider(self, provider_name : StrictStr, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> None: # noqa: E501 - """外部IDプロバイダの連携解除(Unlink external identity providers) # noqa: E501 - - 外部IDプロバイダの連携を解除します。 Unlink external identity providers. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unlink_provider(provider_name, user_id, async_req=True) - >>> result = thread.get() - - :param provider_name: (required) - :type provider_name: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the unlink_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.unlink_provider_with_http_info(provider_name, user_id, **kwargs) # noqa: E501 - - @validate_arguments - def unlink_provider_with_http_info(self, provider_name : StrictStr, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """外部IDプロバイダの連携解除(Unlink external identity providers) # noqa: E501 - - 外部IDプロバイダの連携を解除します。 Unlink external identity providers. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.unlink_provider_with_http_info(provider_name, user_id, async_req=True) - >>> result = thread.get() - - :param provider_name: (required) - :type provider_name: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'provider_name', - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method unlink_provider" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['provider_name']: - _path_params['provider_name'] = _params['provider_name'] - - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/users/{user_id}/providers/{provider_name}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_saas_user_email(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_saas_user_email_param : Optional[UpdateSaasUserEmailParam] = None, **kwargs) -> None: # noqa: E501 - """メールアドレスを変更(Change Email) # noqa: E501 - - ユーザーのメールアドレスを変更します。 Change user's email. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_saas_user_email(user_id, update_saas_user_email_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_saas_user_email_param: - :type update_saas_user_email_param: UpdateSaasUserEmailParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_saas_user_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_saas_user_email_with_http_info(user_id, update_saas_user_email_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_saas_user_email_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_saas_user_email_param : Optional[UpdateSaasUserEmailParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """メールアドレスを変更(Change Email) # noqa: E501 - - ユーザーのメールアドレスを変更します。 Change user's email. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_saas_user_email_with_http_info(user_id, update_saas_user_email_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_saas_user_email_param: - :type update_saas_user_email_param: UpdateSaasUserEmailParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'user_id', - 'update_saas_user_email_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_saas_user_email" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_saas_user_email_param'] is not None: - _body_params = _params['update_saas_user_email_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/users/{user_id}/email', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_saas_user_password(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_saas_user_password_param : Optional[UpdateSaasUserPasswordParam] = None, **kwargs) -> None: # noqa: E501 - """パスワードを変更(Change Password) # noqa: E501 - - ユーザーのログインパスワードを変更します。 Change user's login password. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_saas_user_password(user_id, update_saas_user_password_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_saas_user_password_param: - :type update_saas_user_password_param: UpdateSaasUserPasswordParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_saas_user_password_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_saas_user_password_with_http_info(user_id, update_saas_user_password_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_saas_user_password_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_saas_user_password_param : Optional[UpdateSaasUserPasswordParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """パスワードを変更(Change Password) # noqa: E501 - - ユーザーのログインパスワードを変更します。 Change user's login password. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_saas_user_password_with_http_info(user_id, update_saas_user_password_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_saas_user_password_param: - :type update_saas_user_password_param: UpdateSaasUserPasswordParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'user_id', - 'update_saas_user_password_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_saas_user_password" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_saas_user_password_param'] is not None: - _body_params = _params['update_saas_user_password_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/users/{user_id}/password', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_software_token(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_software_token_param : Optional[UpdateSoftwareTokenParam] = None, **kwargs) -> None: # noqa: E501 - """認証アプリケーションを登録(Register Authentication Application) # noqa: E501 - - 認証アプリケーションを登録します。 Register an authentication application. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_software_token(user_id, update_software_token_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_software_token_param: - :type update_software_token_param: UpdateSoftwareTokenParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_software_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_software_token_with_http_info(user_id, update_software_token_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_software_token_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_software_token_param : Optional[UpdateSoftwareTokenParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """認証アプリケーションを登録(Register Authentication Application) # noqa: E501 - - 認証アプリケーションを登録します。 Register an authentication application. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_software_token_with_http_info(user_id, update_software_token_param, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_software_token_param: - :type update_software_token_param: UpdateSoftwareTokenParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'user_id', - 'update_software_token_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_software_token" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_software_token_param'] is not None: - _body_params = _params['update_software_token_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/users/{user_id}/mfa/software-token', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_user_mfa_preference(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], body : Optional[MfaPreference] = None, **kwargs) -> None: # noqa: E501 - """ユーザーのMFA設定を更新(Update User's MFA Settings) # noqa: E501 - - ユーザーのMFA設定を更新します。 Update user's MFA settings. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_user_mfa_preference(user_id, body, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param body: - :type body: MfaPreference - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_user_mfa_preference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_user_mfa_preference_with_http_info(user_id, body, **kwargs) # noqa: E501 - - @validate_arguments - def update_user_mfa_preference_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], body : Optional[MfaPreference] = None, **kwargs) -> ApiResponse: # noqa: E501 - """ユーザーのMFA設定を更新(Update User's MFA Settings) # noqa: E501 - - ユーザーのMFA設定を更新します。 Update user's MFA settings. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_user_mfa_preference_with_http_info(user_id, body, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param body: - :type body: MfaPreference - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'user_id', - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_user_mfa_preference" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/users/{user_id}/mfa/preference', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/saasus_tenant_api.py b/saasus_sdk_python/api/saasus_tenant_api.py deleted file mode 100644 index 0d34768..0000000 --- a/saasus_sdk_python/api/saasus_tenant_api.py +++ /dev/null @@ -1,966 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from saasus_sdk_python.models.api_keys import ApiKeys -from saasus_sdk_python.models.client_secret import ClientSecret -from saasus_sdk_python.models.saas_id import SaasId - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class SaasusTenantApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_api_key(self, **kwargs) -> None: # noqa: E501 - """APIキーを作成(Create API Key) # noqa: E501 - - サーバサイド用に API キーを発行します。 最大 2 つまで発行できます。 Generate an API key for the server side. Up to 2 can be generated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_api_key(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_api_key_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_api_key_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def create_api_key_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """APIキーを作成(Create API Key) # noqa: E501 - - サーバサイド用に API キーを発行します。 最大 2 つまで発行できます。 Generate an API key for the server side. Up to 2 can be generated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_api_key_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_api_key" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/apikeys', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_api_key(self, api_key : Annotated[StrictStr, Field(..., description="APIキー(API key)")], **kwargs) -> None: # noqa: E501 - """APIキーを削除(Delete API Key) # noqa: E501 - - サーバサイド用の API キーを削除します。 Delete API Key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_api_key(api_key, async_req=True) - >>> result = thread.get() - - :param api_key: APIキー(API key) (required) - :type api_key: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_api_key_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_api_key_with_http_info(api_key, **kwargs) # noqa: E501 - - @validate_arguments - def delete_api_key_with_http_info(self, api_key : Annotated[StrictStr, Field(..., description="APIキー(API key)")], **kwargs) -> ApiResponse: # noqa: E501 - """APIキーを削除(Delete API Key) # noqa: E501 - - サーバサイド用の API キーを削除します。 Delete API Key. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_api_key_with_http_info(api_key, async_req=True) - >>> result = thread.get() - - :param api_key: APIキー(API key) (required) - :type api_key: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'api_key' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_api_key" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['api_key']: - _path_params['api_key'] = _params['api_key'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/apikeys/{api_key}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_api_keys(self, **kwargs) -> ApiKeys: # noqa: E501 - """APIキー一覧を取得(Get API Keys) # noqa: E501 - - サーバサイド用に API キーを取得します。 最大 2 つまで発行できます。 Get API key for the server side. Up to 2 can be generated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_api_keys(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ApiKeys - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_api_keys_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_api_keys_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_api_keys_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """APIキー一覧を取得(Get API Keys) # noqa: E501 - - サーバサイド用に API キーを取得します。 最大 2 つまで発行できます。 Get API key for the server side. Up to 2 can be generated. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_api_keys_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ApiKeys, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_keys" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "ApiKeys", - '500': "Error", - } - - return self.api_client.call_api( - '/apikeys', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_client_secret(self, **kwargs) -> ClientSecret: # noqa: E501 - """クライアントシークレットを取得(Get Client Secret) # noqa: E501 - - API リクエストでアプリが使用する固定文字列を取得します。 Gets the fixed string that the app uses in API requests. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_client_secret(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ClientSecret - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_client_secret_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_client_secret_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_client_secret_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """クライアントシークレットを取得(Get Client Secret) # noqa: E501 - - API リクエストでアプリが使用する固定文字列を取得します。 Gets the fixed string that the app uses in API requests. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_client_secret_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ClientSecret, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_client_secret" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "ClientSecret", - '500': "Error", - } - - return self.api_client.call_api( - '/client-secret', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_saas_id(self, **kwargs) -> SaasId: # noqa: E501 - """SaasIDを取得(Get SaasID) # noqa: E501 - - テナントのSaasIDを取得します。 SaaSus API および SaaSus SDK にて利用します。 Get the tenant's SaasID. Used by SaaSus API and SaaSus SDK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_saas_id(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: SaasId - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_saas_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_saas_id_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_saas_id_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """SaasIDを取得(Get SaasID) # noqa: E501 - - テナントのSaasIDを取得します。 SaaSus API および SaaSus SDK にて利用します。 Get the tenant's SaasID. Used by SaaSus API and SaaSus SDK. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_saas_id_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(SaasId, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_saas_id" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "SaasId", - '500': "Error", - } - - return self.api_client.call_api( - '/saasid', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_client_secret(self, **kwargs) -> None: # noqa: E501 - """クライアントシークレットを更新(Update Client Secret) # noqa: E501 - - API リクエストでアプリが使用する固定文字列を再発行します。 既に稼働中のSaaSアプリケーションに設定している場合には、動作に影響があります。 Reissue fixed strings that apps use in API requests. If changed on a SaaS application that is already running, it will affect the behavior. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_client_secret(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_client_secret_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_client_secret_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def update_client_secret_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """クライアントシークレットを更新(Update Client Secret) # noqa: E501 - - API リクエストでアプリが使用する固定文字列を再発行します。 既に稼働中のSaaSアプリケーションに設定している場合には、動作に影響があります。 Reissue fixed strings that apps use in API requests. If changed on a SaaS application that is already running, it will affect the behavior. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_client_secret_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_client_secret" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/client-secret', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_saas_id(self, **kwargs) -> None: # noqa: E501 - """SaasIDを更新(Update SaasID) # noqa: E501 - - テナントのSaasIDを更新します。 SaaSus API および SaaSus SDK にて利用します。 既に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。 Update the tenant's SaasID. Used by SaaSus API and SaaSus SDK. If changed on an SaaS application that is already running, it will affect the behavior. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_saas_id(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_saas_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_saas_id_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def update_saas_id_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """SaasIDを更新(Update SaasID) # noqa: E501 - - テナントのSaasIDを更新します。 SaaSus API および SaaSus SDK にて利用します。 既に稼働中の SaaS アプリケーションに設定している場合には、動作に影響があります。 Update the tenant's SaasID. Used by SaaSus API and SaaSus SDK. If changed on an SaaS application that is already running, it will affect the behavior. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_saas_id_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_saas_id" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/saasid', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/tenant_api.py b/saasus_sdk_python/api/tenant_api.py deleted file mode 100644 index 4bafd5a..0000000 --- a/saasus_sdk_python/api/tenant_api.py +++ /dev/null @@ -1,1451 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.billing_info import BillingInfo -from saasus_sdk_python.models.plan_reservation import PlanReservation -from saasus_sdk_python.models.tenant import Tenant -from saasus_sdk_python.models.tenant_detail import TenantDetail -from saasus_sdk_python.models.tenant_props import TenantProps -from saasus_sdk_python.models.tenants import Tenants - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class TenantApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_tenant(self, body : Optional[TenantProps] = None, **kwargs) -> Tenant: # noqa: E501 - """テナントを作成(Create Tenant) # noqa: E501 - - SaaSus Platform で管理する、テナント情報を作成します。 Create a tenant managed by the SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: TenantProps - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Tenant - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_tenant_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def create_tenant_with_http_info(self, body : Optional[TenantProps] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナントを作成(Create Tenant) # noqa: E501 - - SaaSus Platform で管理する、テナント情報を作成します。 Create a tenant managed by the SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: TenantProps - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Tenant, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_tenant" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "Tenant", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def create_tenant_and_pricing(self, **kwargs) -> None: # noqa: E501 - """stripe初期設定(Stripe Initial Setting) # noqa: E501 - - billing経由でstripeへ初期情報を設定 Set Stripe initial information via billing # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_and_pricing(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_tenant_and_pricing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_tenant_and_pricing_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def create_tenant_and_pricing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """stripe初期設定(Stripe Initial Setting) # noqa: E501 - - billing経由でstripeへ初期情報を設定 Set Stripe initial information via billing # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_and_pricing_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_tenant_and_pricing" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/stripe/init', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_stripe_tenant_and_pricing(self, **kwargs) -> None: # noqa: E501 - """stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe) # noqa: E501 - - stripe上の顧客情報・商品情報を削除します Delete customer and product from Stripe. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_stripe_tenant_and_pricing(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_stripe_tenant_and_pricing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_stripe_tenant_and_pricing_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def delete_stripe_tenant_and_pricing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """stripe上の顧客情報・商品情報の削除(Delete Customer and Product From Stripe) # noqa: E501 - - stripe上の顧客情報・商品情報を削除します Delete customer and product from Stripe. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_stripe_tenant_and_pricing_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_stripe_tenant_and_pricing" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/stripe', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], **kwargs) -> None: # noqa: E501 - """テナント情報を削除(Delete Tenant) # noqa: E501 - - SaaSus Platform で管理する、テナントの詳細情報を削除します。 Delete SaaSus Platform tenant. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant(tenant_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_tenant_with_http_info(tenant_id, **kwargs) # noqa: E501 - - @validate_arguments - def delete_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナント情報を削除(Delete Tenant) # noqa: E501 - - SaaSus Platform で管理する、テナントの詳細情報を削除します。 Delete SaaSus Platform tenant. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_with_http_info(tenant_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_tenant" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], **kwargs) -> TenantDetail: # noqa: E501 - """テナント情報を取得(Get Tenant Details) # noqa: E501 - - SaaSus Platform で管理する、テナントの詳細情報を取得します。 Get the details of tenant managed on the SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant(tenant_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: TenantDetail - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_tenant_with_http_info(tenant_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナント情報を取得(Get Tenant Details) # noqa: E501 - - SaaSus Platform で管理する、テナントの詳細情報を取得します。 Get the details of tenant managed on the SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_with_http_info(tenant_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(TenantDetail, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'tenant_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_tenant" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "TenantDetail", - '404': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants/{tenant_id}', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_tenants(self, **kwargs) -> Tenants: # noqa: E501 - """テナント一覧取得(Get Tenants) # noqa: E501 - - SaaSus Platform で管理する、テナント情報の取得を行います。 Get tenants managed by SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenants(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Tenants - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_tenants_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_tenants_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_tenants_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """テナント一覧取得(Get Tenants) # noqa: E501 - - SaaSus Platform で管理する、テナント情報の取得を行います。 Get tenants managed by SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenants_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Tenants, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_tenants" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Tenants", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def reset_plan(self, **kwargs) -> None: # noqa: E501 - """プランに関わる情報を全削除 # noqa: E501 - - 料金プランに関わる情報を全削除します。 テナントに連携されたプランとプラン定義を削除します。 Stripe連携している場合、連携が解除されます。 Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reset_plan(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the reset_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.reset_plan_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def reset_plan_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """プランに関わる情報を全削除 # noqa: E501 - - 料金プランに関わる情報を全削除します。 テナントに連携されたプランとプラン定義を削除します。 Stripe連携している場合、連携が解除されます。 Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reset_plan_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_plan" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/plans/reset', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], body : Optional[TenantProps] = None, **kwargs) -> None: # noqa: E501 - """テナント情報を更新(Update Tenant Details) # noqa: E501 - - SaaSus Platform で管理する、テナントの詳細情報を更新します。 Update SaaSus Platform tenant details. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant(tenant_id, body, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param body: - :type body: TenantProps - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_tenant_with_http_info(tenant_id, body, **kwargs) # noqa: E501 - - @validate_arguments - def update_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], body : Optional[TenantProps] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナント情報を更新(Update Tenant Details) # noqa: E501 - - SaaSus Platform で管理する、テナントの詳細情報を更新します。 Update SaaSus Platform tenant details. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_with_http_info(tenant_id, body, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param body: - :type body: TenantProps - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_tenant" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_tenant_billing_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], body : Optional[BillingInfo] = None, **kwargs) -> None: # noqa: E501 - """テナントの請求先情報を更新(Update Tenant Billing Information) # noqa: E501 - - SaaSus Platform で管理しているテナントの請求先情報を更新します。 Update SaaSus Platform tenant billing information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_billing_info(tenant_id, body, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param body: - :type body: BillingInfo - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_tenant_billing_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_tenant_billing_info_with_http_info(tenant_id, body, **kwargs) # noqa: E501 - - @validate_arguments - def update_tenant_billing_info_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], body : Optional[BillingInfo] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナントの請求先情報を更新(Update Tenant Billing Information) # noqa: E501 - - SaaSus Platform で管理しているテナントの請求先情報を更新します。 Update SaaSus Platform tenant billing information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_billing_info_with_http_info(tenant_id, body, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param body: - :type body: BillingInfo - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_tenant_billing_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}/billing-info', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_tenant_plan(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], body : Optional[PlanReservation] = None, **kwargs) -> None: # noqa: E501 - """テナントのプラン情報を更新(Update Tenant Plan Information) # noqa: E501 - - SaaSus Platform で管理しているテナントのプラン情報を更新します。 Update SaaSus Platform tenant plan information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_plan(tenant_id, body, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param body: - :type body: PlanReservation - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_tenant_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_tenant_plan_with_http_info(tenant_id, body, **kwargs) # noqa: E501 - - @validate_arguments - def update_tenant_plan_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], body : Optional[PlanReservation] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナントのプラン情報を更新(Update Tenant Plan Information) # noqa: E501 - - SaaSus Platform で管理しているテナントのプラン情報を更新します。 Update SaaSus Platform tenant plan information. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_plan_with_http_info(tenant_id, body, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param body: - :type body: PlanReservation - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_tenant_plan" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}/plans', 'PUT', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/tenant_attribute_api.py b/saasus_sdk_python/api/tenant_attribute_api.py deleted file mode 100644 index 604c0cf..0000000 --- a/saasus_sdk_python/api/tenant_attribute_api.py +++ /dev/null @@ -1,463 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.attribute import Attribute -from saasus_sdk_python.models.tenant_attributes import TenantAttributes - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class TenantAttributeApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_tenant_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 - """テナント属性の作成(Create Tenant Attribute) # noqa: E501 - - SaaSus Platform で管理する、テナントの追加属性の登録を行います。 例えばテナントの呼び名やメモなどをを持たせることができ、SaaSからSaaSus SDK/APIを利用して取得することができます。 Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_attribute(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Attribute - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Attribute - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_tenant_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_tenant_attribute_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def create_tenant_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナント属性の作成(Create Tenant Attribute) # noqa: E501 - - SaaSus Platform で管理する、テナントの追加属性の登録を行います。 例えばテナントの呼び名やメモなどをを持たせることができ、SaaSからSaaSus SDK/APIを利用して取得することができます。 Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_attribute_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Attribute - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_tenant_attribute" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "Attribute", - '500': "Error", - } - - return self.api_client.call_api( - '/tenant-attributes', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_tenant_attribute(self, attribute_name : Annotated[StrictStr, Field(..., description="属性名(Attribute Name)")], **kwargs) -> None: # noqa: E501 - """テナント属性の削除(Delete Tenant Attribute) # noqa: E501 - - SaaSus Platform で管理する、テナントの追加属性の削除を行います。 Deletes tenant attributes managed by SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_attribute(attribute_name, async_req=True) - >>> result = thread.get() - - :param attribute_name: 属性名(Attribute Name) (required) - :type attribute_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_tenant_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_tenant_attribute_with_http_info(attribute_name, **kwargs) # noqa: E501 - - @validate_arguments - def delete_tenant_attribute_with_http_info(self, attribute_name : Annotated[StrictStr, Field(..., description="属性名(Attribute Name)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナント属性の削除(Delete Tenant Attribute) # noqa: E501 - - SaaSus Platform で管理する、テナントの追加属性の削除を行います。 Deletes tenant attributes managed by SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_attribute_with_http_info(attribute_name, async_req=True) - >>> result = thread.get() - - :param attribute_name: 属性名(Attribute Name) (required) - :type attribute_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'attribute_name' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_tenant_attribute" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['attribute_name']: - _path_params['attribute_name'] = _params['attribute_name'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenant-attributes/{attribute_name}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_tenant_attributes(self, **kwargs) -> TenantAttributes: # noqa: E501 - """テナント属性の一覧を取得(Get Tenant Attributes) # noqa: E501 - - SaaSus Platform で管理する、テナントの追加属性の定義を取得します。 例えばテナントの呼び名やメモなどをを持たせることができ、SaaSからSaaSus SDK/APIを利用して取得することができます。 Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_attributes(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: TenantAttributes - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_tenant_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_tenant_attributes_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_tenant_attributes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """テナント属性の一覧を取得(Get Tenant Attributes) # noqa: E501 - - SaaSus Platform で管理する、テナントの追加属性の定義を取得します。 例えばテナントの呼び名やメモなどをを持たせることができ、SaaSからSaaSus SDK/APIを利用して取得することができます。 Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_attributes_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(TenantAttributes, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_tenant_attributes" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "TenantAttributes", - '500': "Error", - } - - return self.api_client.call_api( - '/tenant-attributes', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/tenant_user_api.py b/saasus_sdk_python/api/tenant_user_api.py deleted file mode 100644 index 362de5a..0000000 --- a/saasus_sdk_python/api/tenant_user_api.py +++ /dev/null @@ -1,1401 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictInt, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.create_tenant_user_param import CreateTenantUserParam -from saasus_sdk_python.models.create_tenant_user_roles_param import CreateTenantUserRolesParam -from saasus_sdk_python.models.update_tenant_user_param import UpdateTenantUserParam -from saasus_sdk_python.models.user import User -from saasus_sdk_python.models.users import Users - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class TenantUserApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], create_tenant_user_param : Optional[CreateTenantUserParam] = None, **kwargs) -> User: # noqa: E501 - """テナントにユーザーを作成(Create Tenant User) # noqa: E501 - - テナントにユーザーを作成します。 attributesを空のオブジェクトにした場合、追加属性は空で作成されます。 Create a tenant user. If attributes is empty, the additional attributes will be created empty. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_user(tenant_id, create_tenant_user_param, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param create_tenant_user_param: - :type create_tenant_user_param: CreateTenantUserParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: User - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_tenant_user_with_http_info(tenant_id, create_tenant_user_param, **kwargs) # noqa: E501 - - @validate_arguments - def create_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], create_tenant_user_param : Optional[CreateTenantUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナントにユーザーを作成(Create Tenant User) # noqa: E501 - - テナントにユーザーを作成します。 attributesを空のオブジェクトにした場合、追加属性は空で作成されます。 Create a tenant user. If attributes is empty, the additional attributes will be created empty. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_user_with_http_info(tenant_id, create_tenant_user_param, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param create_tenant_user_param: - :type create_tenant_user_param: CreateTenantUserParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'create_tenant_user_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_tenant_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['create_tenant_user_param'] is not None: - _body_params = _params['create_tenant_user_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "User", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants/{tenant_id}/users', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def create_tenant_user_roles(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], create_tenant_user_roles_param : Optional[CreateTenantUserRolesParam] = None, **kwargs) -> None: # noqa: E501 - """テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role) # noqa: E501 - - テナントのユーザーに役割(ロール)を作成します。 Create roles on tenant users. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param create_tenant_user_roles_param: - :type create_tenant_user_roles_param: CreateTenantUserRolesParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_tenant_user_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_tenant_user_roles_with_http_info(tenant_id, user_id, env_id, create_tenant_user_roles_param, **kwargs) # noqa: E501 - - @validate_arguments - def create_tenant_user_roles_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], create_tenant_user_roles_param : Optional[CreateTenantUserRolesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナントのユーザー情報に役割(ロール)を作成(Create Tenant User Role) # noqa: E501 - - テナントのユーザーに役割(ロール)を作成します。 Create roles on tenant users. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_tenant_user_roles_with_http_info(tenant_id, user_id, env_id, create_tenant_user_roles_param, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param create_tenant_user_roles_param: - :type create_tenant_user_roles_param: CreateTenantUserRolesParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'user_id', - 'env_id', - 'create_tenant_user_roles_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_tenant_user_roles" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - if _params['env_id']: - _path_params['env_id'] = _params['env_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['create_tenant_user_roles_param'] is not None: - _body_params = _params['create_tenant_user_roles_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> None: # noqa: E501 - """テナントのユーザー情報を削除(Delete Tenant User) # noqa: E501 - - テナントからユーザーを削除します。 Delete a user from your tenant. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_user(tenant_id, user_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_tenant_user_with_http_info(tenant_id, user_id, **kwargs) # noqa: E501 - - @validate_arguments - def delete_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナントのユーザー情報を削除(Delete Tenant User) # noqa: E501 - - テナントからユーザーを削除します。 Delete a user from your tenant. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_user_with_http_info(tenant_id, user_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_tenant_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}/users/{user_id}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_tenant_user_role(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], role_name : Annotated[StrictStr, Field(..., description="役割(ロール)名(role name)")], **kwargs) -> None: # noqa: E501 - """テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User) # noqa: E501 - - テナントのユーザーから役割(ロール)を削除します。 Remove a role from a tenant user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_user_role(tenant_id, user_id, env_id, role_name, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param role_name: 役割(ロール)名(role name) (required) - :type role_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_tenant_user_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_tenant_user_role_with_http_info(tenant_id, user_id, env_id, role_name, **kwargs) # noqa: E501 - - @validate_arguments - def delete_tenant_user_role_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], env_id : Annotated[StrictInt, Field(..., description="環境ID(Env ID)")], role_name : Annotated[StrictStr, Field(..., description="役割(ロール)名(role name)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナントのユーザーから役割(ロール)を削除(Remove Role From Tenant User) # noqa: E501 - - テナントのユーザーから役割(ロール)を削除します。 Remove a role from a tenant user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_tenant_user_role_with_http_info(tenant_id, user_id, env_id, role_name, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param env_id: 環境ID(Env ID) (required) - :type env_id: int - :param role_name: 役割(ロール)名(role name) (required) - :type role_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'user_id', - 'env_id', - 'role_name' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_tenant_user_role" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - if _params['env_id']: - _path_params['env_id'] = _params['env_id'] - - if _params['role_name']: - _path_params['role_name'] = _params['role_name'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_all_tenant_user(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> Users: # noqa: E501 - """ユーザー情報を取得(Get User Info) # noqa: E501 - - ユーザーIDからテナントに所属しているユーザー情報を取得します。 複数テナントに所属している場合は別のオブジェクトとして返却されます。 Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_all_tenant_user(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Users - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_all_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_all_tenant_user_with_http_info(user_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_all_tenant_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー情報を取得(Get User Info) # noqa: E501 - - ユーザーIDからテナントに所属しているユーザー情報を取得します。 複数テナントに所属している場合は別のオブジェクトとして返却されます。 Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_all_tenant_user_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_all_tenant_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Users", - '404': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants/all/users/{user_id}', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_all_tenant_users(self, **kwargs) -> Users: # noqa: E501 - """ユーザー一覧を取得(Get Users) # noqa: E501 - - テナントに所属しているユーザー全件を取得します。 複数テナントに所属する同一ユーザーは別のオブジェクトとして返却されます。 idは一意ではありません。 Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_all_tenant_users(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Users - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_all_tenant_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_all_tenant_users_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_all_tenant_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー一覧を取得(Get Users) # noqa: E501 - - テナントに所属しているユーザー全件を取得します。 複数テナントに所属する同一ユーザーは別のオブジェクトとして返却されます。 idは一意ではありません。 Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_all_tenant_users_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_all_tenant_users" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Users", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants/all/users', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> User: # noqa: E501 - """テナントのユーザー情報を取得(Get Tenant User) # noqa: E501 - - テナントのユーザーをIDから一件取得します。 Get one tenant user by specific ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_user(tenant_id, user_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: User - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_tenant_user_with_http_info(tenant_id, user_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナントのユーザー情報を取得(Get Tenant User) # noqa: E501 - - テナントのユーザーをIDから一件取得します。 Get one tenant user by specific ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_user_with_http_info(tenant_id, user_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'user_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_tenant_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "User", - '404': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants/{tenant_id}/users/{user_id}', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_tenant_users(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], **kwargs) -> Users: # noqa: E501 - """テナントのユーザー一覧を取得(Get Tenant Users) # noqa: E501 - - テナントに所属するユーザーを全件取得します。 idは一意です。 Get all the users belonging to the tenant. Id is unique. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_users(tenant_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Users - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_tenant_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_tenant_users_with_http_info(tenant_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_tenant_users_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], **kwargs) -> ApiResponse: # noqa: E501 - """テナントのユーザー一覧を取得(Get Tenant Users) # noqa: E501 - - テナントに所属するユーザーを全件取得します。 idは一意です。 Get all the users belonging to the tenant. Id is unique. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_tenant_users_with_http_info(tenant_id, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'tenant_id' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_tenant_users" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "Users", - '500': "Error", - } - - return self.api_client.call_api( - '/tenants/{tenant_id}/users', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def update_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_tenant_user_param : Optional[UpdateTenantUserParam] = None, **kwargs) -> None: # noqa: E501 - """テナントのユーザー属性情報を更新(Update Tenant User Attribute) # noqa: E501 - - テナントのユーザー属性情報を更新します。 Update tenant user attributes. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_user(tenant_id, user_id, update_tenant_user_param, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_tenant_user_param: - :type update_tenant_user_param: UpdateTenantUserParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the update_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.update_tenant_user_with_http_info(tenant_id, user_id, update_tenant_user_param, **kwargs) # noqa: E501 - - @validate_arguments - def update_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="テナントID(Tenant ID)")], user_id : Annotated[StrictStr, Field(..., description="ユーザーID(User ID)")], update_tenant_user_param : Optional[UpdateTenantUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 - """テナントのユーザー属性情報を更新(Update Tenant User Attribute) # noqa: E501 - - テナントのユーザー属性情報を更新します。 Update tenant user attributes. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_tenant_user_with_http_info(tenant_id, user_id, update_tenant_user_param, async_req=True) - >>> result = thread.get() - - :param tenant_id: テナントID(Tenant ID) (required) - :type tenant_id: str - :param user_id: ユーザーID(User ID) (required) - :type user_id: str - :param update_tenant_user_param: - :type update_tenant_user_param: UpdateTenantUserParam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'tenant_id', - 'user_id', - 'update_tenant_user_param' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method update_tenant_user" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['tenant_id']: - _path_params['tenant_id'] = _params['tenant_id'] - - if _params['user_id']: - _path_params['user_id'] = _params['user_id'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['update_tenant_user_param'] is not None: - _body_params = _params['update_tenant_user_param'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/tenants/{tenant_id}/users/{user_id}', 'PATCH', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/user_attribute_api.py b/saasus_sdk_python/api/user_attribute_api.py deleted file mode 100644 index 7065324..0000000 --- a/saasus_sdk_python/api/user_attribute_api.py +++ /dev/null @@ -1,463 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from typing import Optional - -from saasus_sdk_python.models.attribute import Attribute -from saasus_sdk_python.models.user_attributes import UserAttributes - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class UserAttributeApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_user_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 - """ユーザー属性の作成(Create User Attributes) # noqa: E501 - - SaaSus Platform にて保持するユーザーの追加属性を登録します。 例えば、ユーザー名を持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます。 一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性定義を行わずに SaaS 側で個人情報を持つことを検討してください。 Create additional user attributes to be kept on the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_user_attribute(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Attribute - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Attribute - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the create_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.create_user_attribute_with_http_info(body, **kwargs) # noqa: E501 - - @validate_arguments - def create_user_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー属性の作成(Create User Attributes) # noqa: E501 - - SaaSus Platform にて保持するユーザーの追加属性を登録します。 例えば、ユーザー名を持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます。 一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性定義を行わずに SaaS 側で個人情報を持つことを検討してください。 Create additional user attributes to be kept on the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_user_attribute_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: - :type body: Attribute - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'body' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_user_attribute" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params['body'] is not None: - _body_params = _params['body'] - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'])) - if _content_types_list: - _header_params['Content-Type'] = _content_types_list - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '201': "Attribute", - '500': "Error", - } - - return self.api_client.call_api( - '/user-attributes', 'POST', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def delete_user_attribute(self, attribute_name : Annotated[StrictStr, Field(..., description="属性名(Attribute Name)")], **kwargs) -> None: # noqa: E501 - """ユーザー属性の削除(Delete User Attribute) # noqa: E501 - - SaaSus Platform にて保持するユーザーの追加属性を削除します。 Delete user attributes kept on the SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_user_attribute(attribute_name, async_req=True) - >>> result = thread.get() - - :param attribute_name: 属性名(Attribute Name) (required) - :type attribute_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the delete_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.delete_user_attribute_with_http_info(attribute_name, **kwargs) # noqa: E501 - - @validate_arguments - def delete_user_attribute_with_http_info(self, attribute_name : Annotated[StrictStr, Field(..., description="属性名(Attribute Name)")], **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー属性の削除(Delete User Attribute) # noqa: E501 - - SaaSus Platform にて保持するユーザーの追加属性を削除します。 Delete user attributes kept on the SaaSus Platform. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_user_attribute_with_http_info(attribute_name, async_req=True) - >>> result = thread.get() - - :param attribute_name: 属性名(Attribute Name) (required) - :type attribute_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [ - 'attribute_name' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_user_attribute" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params['attribute_name']: - _path_params['attribute_name'] = _params['attribute_name'] - - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - '/user-attributes/{attribute_name}', 'DELETE', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) - - @validate_arguments - def get_user_attributes(self, **kwargs) -> UserAttributes: # noqa: E501 - """ユーザー属性の一覧を取得(Get User Attributes) # noqa: E501 - - SaaSus Platform にて保持するユーザーの追加属性を取得します。 例えば、ユーザー名を持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます。 一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性定義を行わずに SaaS 側で個人情報を持つことを検討してください。 Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_attributes(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: UserAttributes - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_user_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_user_attributes_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_user_attributes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー属性の一覧を取得(Get User Attributes) # noqa: E501 - - SaaSus Platform にて保持するユーザーの追加属性を取得します。 例えば、ユーザー名を持たせる、誕生日を持たせるなど、ユーザーに紐付いた項目の定義を行うことができます。 一方で、個人情報を SaaSus Platform 側に持たせたくない場合は、このユーザー属性定義を行わずに SaaS 側で個人情報を持つことを検討してください。 Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_attributes_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(UserAttributes, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_attributes" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "UserAttributes", - '500': "Error", - } - - return self.api_client.call_api( - '/user-attributes', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api/user_info_api.py b/saasus_sdk_python/api/user_info_api.py deleted file mode 100644 index 90b1d19..0000000 --- a/saasus_sdk_python/api/user_info_api.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictStr - -from saasus_sdk_python.models.user_info import UserInfo - -from saasus_sdk_python.api_client import ApiClient -from saasus_sdk_python.api_response import ApiResponse -from saasus_sdk_python.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class UserInfoApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_user_info(self, token : Annotated[StrictStr, Field(..., description="IDトークン(ID Token)")], **kwargs) -> UserInfo: # noqa: E501 - """ユーザー情報取得(Get User Info) # noqa: E501 - - SaaS利用ユーザ(登録ユーザ)のIDトークンを元に、ユーザ情報を取得します。 IDトークンは、SaaSus Platform生成のログイン画面からログイン時にCallback URLに渡されます。 サーバ側でそのURLからIDトークンを取得し、このAPIを呼ぶことにより、該当ユーザの情報が取得できます。 取得した上には、所属テナントや役割(ロール)、料金プランなどが含まれているため、それを元に認可の実装を行うことが可能です。 User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_info(token, async_req=True) - >>> result = thread.get() - - :param token: IDトークン(ID Token) (required) - :type token: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :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 - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: UserInfo - """ - kwargs['_return_http_data_only'] = True - if '_preload_content' in kwargs: - raise ValueError("Error! Please call the get_user_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.get_user_info_with_http_info(token, **kwargs) # noqa: E501 - - @validate_arguments - def get_user_info_with_http_info(self, token : Annotated[StrictStr, Field(..., description="IDトークン(ID Token)")], **kwargs) -> ApiResponse: # noqa: E501 - """ユーザー情報取得(Get User Info) # noqa: E501 - - SaaS利用ユーザ(登録ユーザ)のIDトークンを元に、ユーザ情報を取得します。 IDトークンは、SaaSus Platform生成のログイン画面からログイン時にCallback URLに渡されます。 サーバ側でそのURLからIDトークンを取得し、このAPIを呼ぶことにより、該当ユーザの情報が取得できます。 取得した上には、所属テナントや役割(ロール)、料金プランなどが含まれているため、それを元に認可の実装を行うことが可能です。 User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_info_with_http_info(token, async_req=True) - >>> result = thread.get() - - :param token: IDトークン(ID Token) (required) - :type token: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(UserInfo, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [ - 'token' - ] - _all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - # validate the arguments - for _key, _val in _params['kwargs'].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user_info" % _key - ) - _params[_key] = _val - del _params['kwargs'] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get('token') is not None: # noqa: E501 - _query_params.append(('token', _params['token'])) - - # process the header parameters - _header_params = dict(_params.get('_headers', {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # authentication setting - _auth_settings = ['Bearer'] # noqa: E501 - - _response_types_map = { - '200': "UserInfo", - '401': "Error", - '500': "Error", - } - - return self.api_client.call_api( - '/userinfo', 'GET', - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get('async_req'), - _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=_params.get('_preload_content', True), - _request_timeout=_params.get('_request_timeout'), - collection_formats=_collection_formats, - _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/api_client.py b/saasus_sdk_python/api_client.py deleted file mode 100644 index c0ab4e4..0000000 --- a/saasus_sdk_python/api_client.py +++ /dev/null @@ -1,755 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -from urllib.parse import quote - -from saasus_sdk_python.configuration import Configuration -from saasus_sdk_python.api_response import ApiResponse -import saasus_sdk_python.models -from saasus_sdk_python import rest -from saasus_sdk_python.exceptions import ApiValueError, ApiException - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_types_map=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None, - _request_auth=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, query_params, auth_settings, - resource_path, method, body, - request_auth=_request_auth) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, - collection_formats) - url += "?" + url_query - - try: - # perform request and return response - response_data = self.request( - method, url, - query_params=query_params, - headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - self.last_response = response_data - - return_data = None # assuming derialization is not needed - # data needs deserialization or returns HTTP data (deserialized) only - if _preload_content or _return_http_data_only: - response_type = response_types_map.get(str(response_data.status), None) - - if response_type == "bytearray": - response_data.data = response_data.data - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type == "bytearray": - return_data = response_data.data - elif response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return return_data - else: - return ApiResponse(status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return {key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items()} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(saasus_sdk_python.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_types_map=None, auth_settings=None, - async_req=None, _return_http_data_only=None, - collection_formats=None, _preload_content=True, - _request_timeout=None, _host=None, _request_auth=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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 - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_token: dict, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.get_request(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.head_request(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.options_request(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - elif method == "POST": - return self.rest_client.post_request(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.put_request(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.patch_request(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.delete_request(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v))) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body, - request_auth=None): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params(headers, queries, - resource_path, method, body, - request_auth) - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params(headers, queries, - resource_path, method, body, - auth_setting) - - def _apply_auth_params(self, headers, queries, - resource_path, method, body, - auth_setting): - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/saasus_sdk_python/callback/callback.py b/saasus_sdk_python/callback/callback.py index 9b77756..7921ff8 100644 --- a/saasus_sdk_python/callback/callback.py +++ b/saasus_sdk_python/callback/callback.py @@ -2,16 +2,16 @@ import os from typing import Union -from saasus_sdk_python.client.client import AuthClient +from saasus_sdk_python.client.client import Client from saasus_sdk_python.middleware.middleware import ErrorResponse -from saasus_sdk_python import CredentialApi, Credentials, ApiClient -from saasus_sdk_python.exceptions import BadRequestException, UnauthorizedException, ServiceException +from saasus_sdk_python.src.auth import CredentialApi, Credentials, ApiClient +from saasus_sdk_python.src.auth.exceptions import BadRequestException, UnauthorizedException, ServiceException class Callback: def __init__(self): - self.client = AuthClient() - self.api_base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + self.client = Client() + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") def get_auth_credentials(self, code: str, auth_type: str = "tempCodeAuth") -> Credentials: api_client = ApiClient() @@ -20,7 +20,7 @@ def get_auth_credentials(self, code: str, auth_type: str = "tempCodeAuth") -> Cr headers={}) api_client.configuration.default_headers = headers # 環境変数でAPIサーバーを切り替える - api_client.configuration.host = f"{self.api_base_url}/auth" + api_client.configuration.host = f"{self.base_url}/auth" credentials = CredentialApi(api_client=api_client).get_auth_credentials( _headers=api_client.configuration.default_headers, code=code, auth_flow=auth_type) return credentials @@ -34,7 +34,7 @@ def get_refresh_token_auth_credentials(self, refresh_token: str, auth_type: str headers={}) api_client.configuration.default_headers = headers # 環境変数でAPIサーバーを切り替える - api_client.configuration.host = f"{self.api_base_url}/auth" + api_client.configuration.host = f"{self.base_url}/auth" credentials = CredentialApi(api_client=api_client).get_auth_credentials( _headers=api_client.configuration.default_headers, refresh_token=refresh_token, auth_flow=auth_type) return credentials diff --git a/saasus_sdk_python/client/apilog_client.py b/saasus_sdk_python/client/apilog_client.py new file mode 100644 index 0000000..6f591a3 --- /dev/null +++ b/saasus_sdk_python/client/apilog_client.py @@ -0,0 +1,54 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.apilog.api_client import ApiClient + + +class SignedApilogApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = Client() + self.configuration.default_headers = {} + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.configuration.host = f"{self.base_url}/apilog" + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) diff --git a/saasus_sdk_python/client/auth_client.py b/saasus_sdk_python/client/auth_client.py new file mode 100644 index 0000000..773f102 --- /dev/null +++ b/saasus_sdk_python/client/auth_client.py @@ -0,0 +1,53 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.auth.api_client import ApiClient + + +class SignedAuthApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + self.client = Client() + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + super().__init__(*args, **kwargs) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.configuration.host = f"{self.base_url}/auth" + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) diff --git a/saasus_sdk_python/client/awsmarketplace_client.py b/saasus_sdk_python/client/awsmarketplace_client.py new file mode 100644 index 0000000..c8997f1 --- /dev/null +++ b/saasus_sdk_python/client/awsmarketplace_client.py @@ -0,0 +1,54 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient + + +class SignedAwsmarketplaceApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = Client() + self.configuration.default_headers = {} + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.configuration.host = f"{self.base_url}/awsmarketplace" + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) \ No newline at end of file diff --git a/saasus_sdk_python/client/billing_client.py b/saasus_sdk_python/client/billing_client.py new file mode 100644 index 0000000..f14959e --- /dev/null +++ b/saasus_sdk_python/client/billing_client.py @@ -0,0 +1,54 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.billing.api_client import ApiClient + + +class SignedBillingApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = Client() + self.configuration.default_headers = {} + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.configuration.host = f"{self.base_url}/billing" + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) diff --git a/saasus_sdk_python/client/client.py b/saasus_sdk_python/client/client.py index 3bfc48a..e0c2721 100644 --- a/saasus_sdk_python/client/client.py +++ b/saasus_sdk_python/client/client.py @@ -6,7 +6,6 @@ from typing import Any from urllib.parse import urlparse, urlencode from dotenv import load_dotenv -from saasus_sdk_python import ApiClient load_dotenv() @@ -19,18 +18,19 @@ def serialize_object(obj: Any) -> str | None: return None -class AuthClient: +class Client: _instance = None def __new__(cls): if cls._instance is None: cls._instance = super().__new__(cls) cls._instance.referer = None + cls._instance.x_saasus_referer = None cls._instance.api_key = os.getenv("SAASUS_API_KEY", "") cls._instance.secret_key = os.getenv("SAASUS_SECRET_KEY", "") cls._instance.saas_id = os.getenv("SAASUS_SAAS_ID", "") - cls._instance.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") cls._instance.time_provider = lambda: time.strftime("%Y%m%d%H%M", time.gmtime()) + cls._instance.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") return cls._instance # 認証用の署名を生成する @@ -46,51 +46,13 @@ def generate_signature(self, method: str, url: str, body: str | None = None, hea msg = timestamp + self.api_key + method.upper() + host_and_path + body signature_hmac = hmac.new(self.secret_key.encode(), msg=msg.encode(), digestmod=hashlib.sha256) headers = headers or {} - headers["Authorization"] = f"{literal} Sig={signature_hmac.hexdigest()}, SaaSID={self.saas_id}, APIKey={self.api_key}" + headers[ + "Authorization"] = f"{literal} Sig={signature_hmac.hexdigest()}, SaaSID={self.saas_id}, APIKey={self.api_key}" return headers def set_referer_header(self, header_params: dict) -> dict: if self.referer: header_params["Referer"] = self.referer + if self.x_saasus_referer: + header_params["X-SaaSus-Referer"] = self.x_saasus_referer return header_params - - -class SignedApiClient(ApiClient): - - def __init__(self, *args, **kwargs): - self.auth_client = AuthClient() - super().__init__(*args, **kwargs) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_types_map=None, auth_settings=None, - async_req=None, _return_http_data_only=None, - collection_formats=None, _preload_content=True, - _request_timeout=None, _host=None, _request_auth=None): - - if path_params: - resource_path = resource_path.format(**path_params) - if query_params: - query_string = urlencode(query_params) - resource_path += f"?{query_string}" - - # リクエストを行う直前に署名を生成する - signature_headers = self.auth_client.generate_signature( - method, self.configuration.host + resource_path, body - ) - - # header_paramsを署名つきのヘッダで更新する。 - if header_params is None: - header_params = {} - header_params.update(signature_headers) - - return super().call_api( - resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - async_req, _return_http_data_only, - collection_formats, _preload_content, - _request_timeout, _host, _request_auth - ) diff --git a/saasus_sdk_python/client/communication_client.py b/saasus_sdk_python/client/communication_client.py new file mode 100644 index 0000000..64de0b3 --- /dev/null +++ b/saasus_sdk_python/client/communication_client.py @@ -0,0 +1,55 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.communication.api_client import ApiClient + + +class SignedCommunicationApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = Client() + self.configuration.default_headers = {} + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.configuration.host = f"{self.base_url}/communication" + + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) \ No newline at end of file diff --git a/saasus_sdk_python/client/integration_client.py b/saasus_sdk_python/client/integration_client.py new file mode 100644 index 0000000..89a5bdc --- /dev/null +++ b/saasus_sdk_python/client/integration_client.py @@ -0,0 +1,54 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.integration.api_client import ApiClient + + +class SignedIntegrationApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = Client() + self.configuration.default_headers = {} + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.configuration.host = f"{self.base_url}/integration" + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) diff --git a/saasus_sdk_python/client/pricing_client.py b/saasus_sdk_python/client/pricing_client.py new file mode 100644 index 0000000..7d65d76 --- /dev/null +++ b/saasus_sdk_python/client/pricing_client.py @@ -0,0 +1,53 @@ +import os +from saasus_sdk_python.client.client import Client +from urllib.parse import urlencode +from saasus_sdk_python.src.pricing.api_client import ApiClient + +class SignedPricingApiClient(ApiClient): + + def __init__(self, referer=None, x_saasus_referer=None, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = Client() + self.configuration.default_headers = {} + self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + + if path_params: + resource_path = resource_path.format(**path_params) + if query_params: + query_string = urlencode(query_params) + resource_path += f"?{query_string}" + + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + self.configuration.host = f"{self.base_url}/pricing" + + # 署名ヘッダを生成してリクエストヘッダに追加する + signature_headers = self.client.generate_signature( + method, self.configuration.host + resource_path, body + ) + + # header_paramsを署名つきのヘッダで更新する。 + if header_params is None: + header_params = {} + header_params.update(signature_headers) + + header_params = self.client.set_referer_header(header_params) + + # APIクライアントのcall_apiメソッドを呼び出して、署名付きのリクエストを行う + return super().call_api( + resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + async_req, _return_http_data_only, + collection_formats, _preload_content, + _request_timeout, _host, _request_auth + ) diff --git a/saasus_sdk_python/configuration.py b/saasus_sdk_python/configuration.py deleted file mode 100644 index d31205d..0000000 --- a/saasus_sdk_python/configuration.py +++ /dev/null @@ -1,442 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import http.client as httplib -from saasus_sdk_python.exceptions import ApiValueError - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration(object): - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor - """ - self._base_path = "https://api.saasus.io/v1/auth" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("saasus_sdk_python") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['Bearer'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.saasus.io/v1/auth", - 'description': "Production API Server", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/saasus_sdk_python/exceptions.py b/saasus_sdk_python/exceptions.py deleted file mode 100644 index fca5bf8..0000000 --- a/saasus_sdk_python/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/saasus_sdk_python/middleware/middleware.py b/saasus_sdk_python/middleware/middleware.py index ea78111..ab64861 100644 --- a/saasus_sdk_python/middleware/middleware.py +++ b/saasus_sdk_python/middleware/middleware.py @@ -2,9 +2,9 @@ import os from openapi_client.exceptions import UnauthorizedException, ServiceException -from saasus_sdk_python import UserInfoApi, UserInfo -from saasus_sdk_python.client.client import AuthClient -from saasus_sdk_python import ApiClient +from saasus_sdk_python.src.auth import UserInfoApi, UserInfo +from saasus_sdk_python.client.client import Client +from saasus_sdk_python.src.auth import ApiClient class AuthenticationError(Exception): @@ -23,14 +23,15 @@ def __str__(self): class Authenticate: def __init__(self): - self.client = AuthClient() - self.api_base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") + self.client = Client() + self.base_url = os.getenv("SAASUS_BASE_URL", "https://api.saasus.io/v1") - def authenticate(self, id_token: str, referer: str | None) -> tuple[None, AuthenticationError] | tuple[UserInfo, None] | tuple[None, ErrorResponse]: # noqa: E501 + def authenticate(self, id_token: str, referer: str | None = None, x_saasus_referer: str | None = None) -> tuple[None, AuthenticationError] | tuple[UserInfo, None] | tuple[None, ErrorResponse]: # noqa: E501 if not id_token: return None, AuthenticationError("Invalid Authorization header") self.client.referer = referer + self.client.x_saasus_referer = x_saasus_referer try: response = self.user_info(id_token) return response, None @@ -47,7 +48,7 @@ def user_info(self, id_token: str) -> UserInfo: headers = self.client.set_referer_header(headers) api_client.configuration.default_headers = headers # 環境変数でAPIサーバーを切り替える - api_client.configuration.host = f"{self.api_base_url}/auth" + api_client.configuration.host = f"{self.base_url}/auth" user_info = UserInfoApi(api_client=api_client).get_user_info(_headers=headers, token=id_token) return user_info diff --git a/saasus_sdk_python/models/__init__.py b/saasus_sdk_python/models/__init__.py deleted file mode 100644 index 8ba08d1..0000000 --- a/saasus_sdk_python/models/__init__.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from saasus_sdk_python.models.account_verification import AccountVerification -from saasus_sdk_python.models.api_keys import ApiKeys -from saasus_sdk_python.models.attribute import Attribute -from saasus_sdk_python.models.attribute_type import AttributeType -from saasus_sdk_python.models.auth_info import AuthInfo -from saasus_sdk_python.models.authorization_temp_code import AuthorizationTempCode -from saasus_sdk_python.models.basic_info import BasicInfo -from saasus_sdk_python.models.billing_address import BillingAddress -from saasus_sdk_python.models.billing_info import BillingInfo -from saasus_sdk_python.models.client_secret import ClientSecret -from saasus_sdk_python.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.create_saas_user_param import CreateSaasUserParam -from saasus_sdk_python.models.create_secret_code_param import CreateSecretCodeParam -from saasus_sdk_python.models.create_tenant_user_param import CreateTenantUserParam -from saasus_sdk_python.models.create_tenant_user_roles_param import CreateTenantUserRolesParam -from saasus_sdk_python.models.credentials import Credentials -from saasus_sdk_python.models.customize_page_props import CustomizePageProps -from saasus_sdk_python.models.customize_page_settings import CustomizePageSettings -from saasus_sdk_python.models.customize_page_settings_props import CustomizePageSettingsProps -from saasus_sdk_python.models.customize_pages import CustomizePages -from saasus_sdk_python.models.device_configuration import DeviceConfiguration -from saasus_sdk_python.models.dns_record import DnsRecord -from saasus_sdk_python.models.env import Env -from saasus_sdk_python.models.envs import Envs -from saasus_sdk_python.models.error import Error -from saasus_sdk_python.models.identity_provider_configuration import IdentityProviderConfiguration -from saasus_sdk_python.models.identity_provider_props import IdentityProviderProps -from saasus_sdk_python.models.identity_providers import IdentityProviders -from saasus_sdk_python.models.invoice_language import InvoiceLanguage -from saasus_sdk_python.models.link_aws_marketplace_param import LinkAwsMarketplaceParam -from saasus_sdk_python.models.message_template import MessageTemplate -from saasus_sdk_python.models.mfa_configuration import MfaConfiguration -from saasus_sdk_python.models.mfa_preference import MfaPreference -from saasus_sdk_python.models.notification_messages import NotificationMessages -from saasus_sdk_python.models.password_policy import PasswordPolicy -from saasus_sdk_python.models.plan_histories import PlanHistories -from saasus_sdk_python.models.plan_history import PlanHistory -from saasus_sdk_python.models.plan_reservation import PlanReservation -from saasus_sdk_python.models.provider_name import ProviderName -from saasus_sdk_python.models.recaptcha_props import RecaptchaProps -from saasus_sdk_python.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam -from saasus_sdk_python.models.role import Role -from saasus_sdk_python.models.roles import Roles -from saasus_sdk_python.models.saas_id import SaasId -from saasus_sdk_python.models.saas_user import SaasUser -from saasus_sdk_python.models.saas_users import SaasUsers -from saasus_sdk_python.models.self_regist import SelfRegist -from saasus_sdk_python.models.sign_in_settings import SignInSettings -from saasus_sdk_python.models.sign_up_param import SignUpParam -from saasus_sdk_python.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam -from saasus_sdk_python.models.software_token_secret_code import SoftwareTokenSecretCode -from saasus_sdk_python.models.tenant import Tenant -from saasus_sdk_python.models.tenant_attributes import TenantAttributes -from saasus_sdk_python.models.tenant_detail import TenantDetail -from saasus_sdk_python.models.tenant_props import TenantProps -from saasus_sdk_python.models.tenants import Tenants -from saasus_sdk_python.models.update_basic_info_param import UpdateBasicInfoParam -from saasus_sdk_python.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam -from saasus_sdk_python.models.update_customize_pages_param import UpdateCustomizePagesParam -from saasus_sdk_python.models.update_env_param import UpdateEnvParam -from saasus_sdk_python.models.update_identity_provider_param import UpdateIdentityProviderParam -from saasus_sdk_python.models.update_notification_messages_param import UpdateNotificationMessagesParam -from saasus_sdk_python.models.update_saas_user_email_param import UpdateSaasUserEmailParam -from saasus_sdk_python.models.update_saas_user_password_param import UpdateSaasUserPasswordParam -from saasus_sdk_python.models.update_sign_in_settings_param import UpdateSignInSettingsParam -from saasus_sdk_python.models.update_software_token_param import UpdateSoftwareTokenParam -from saasus_sdk_python.models.update_tenant_user_param import UpdateTenantUserParam -from saasus_sdk_python.models.user import User -from saasus_sdk_python.models.user_attributes import UserAttributes -from saasus_sdk_python.models.user_available_env import UserAvailableEnv -from saasus_sdk_python.models.user_available_tenant import UserAvailableTenant -from saasus_sdk_python.models.user_info import UserInfo -from saasus_sdk_python.models.users import Users diff --git a/saasus_sdk_python/models/account_verification.py b/saasus_sdk_python/models/account_verification.py deleted file mode 100644 index 68db3f2..0000000 --- a/saasus_sdk_python/models/account_verification.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr, validator - -class AccountVerification(BaseModel): - """ - アカウント認証設定(account authentication settings) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) - """ - verification_method: StrictStr = Field(..., description="code: 検証コード(verification code) link: 検証リンク(verification link) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) ") - sending_to: StrictStr = Field(..., description="email: Eメール(e-mail) sms: SMS smsOrEmail: SMS不可の場合にEメール(email if SMS is not possible) ") - __properties = ["verification_method", "sending_to"] - - @validator('verification_method') - def verification_method_validate_enum(cls, value): - """Validates the enum""" - if value not in ('code', 'link'): - raise ValueError("must be one of enum values ('code', 'link')") - return value - - @validator('sending_to') - def sending_to_validate_enum(cls, value): - """Validates the enum""" - if value not in ('email', 'sms', 'smsOrEmail'): - raise ValueError("must be one of enum values ('email', 'sms', 'smsOrEmail')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> AccountVerification: - """Create an instance of AccountVerification from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> AccountVerification: - """Create an instance of AccountVerification from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return AccountVerification.parse_obj(obj) - - _obj = AccountVerification.parse_obj({ - "verification_method": obj.get("verification_method"), - "sending_to": obj.get("sending_to") - }) - return _obj - - diff --git a/saasus_sdk_python/models/api_keys.py b/saasus_sdk_python/models/api_keys.py deleted file mode 100644 index cab5b95..0000000 --- a/saasus_sdk_python/models/api_keys.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, StrictStr, conlist - -class ApiKeys(BaseModel): - """ - ApiKeys - """ - api_keys: conlist(StrictStr) = Field(..., description="APIキー(API Key)") - __properties = ["api_keys"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ApiKeys: - """Create an instance of ApiKeys from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ApiKeys: - """Create an instance of ApiKeys from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ApiKeys.parse_obj(obj) - - _obj = ApiKeys.parse_obj({ - "api_keys": obj.get("api_keys") - }) - return _obj - - diff --git a/saasus_sdk_python/models/attribute.py b/saasus_sdk_python/models/attribute.py deleted file mode 100644 index 5301639..0000000 --- a/saasus_sdk_python/models/attribute.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr -from saasus_sdk_python.models.attribute_type import AttributeType - -class Attribute(BaseModel): - """ - Attribute - """ - attribute_name: StrictStr = Field(..., description="属性名(attribute name)") - display_name: StrictStr = Field(..., description="表示名(display name)") - attribute_type: AttributeType = Field(...) - __properties = ["attribute_name", "display_name", "attribute_type"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Attribute: - """Create an instance of Attribute from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Attribute: - """Create an instance of Attribute from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Attribute.parse_obj(obj) - - _obj = Attribute.parse_obj({ - "attribute_name": obj.get("attribute_name"), - "display_name": obj.get("display_name"), - "attribute_type": obj.get("attribute_type") - }) - return _obj - - diff --git a/saasus_sdk_python/models/attribute_type.py b/saasus_sdk_python/models/attribute_type.py deleted file mode 100644 index 0079d13..0000000 --- a/saasus_sdk_python/models/attribute_type.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - - - - -class AttributeType(str, Enum): - """ - 型(dateはYYYY-MM-DDの形式で使用する事ができます。) (Type (date can be set to YYYY-MM-DD format.)) - """ - - """ - allowed enum values - """ - STRING = 'string' - NUMBER = 'number' - BOOL = 'bool' - DATE = 'date' - - @classmethod - def from_json(cls, json_str: str) -> AttributeType: - """Create an instance of AttributeType from a JSON string""" - return AttributeType(json.loads(json_str)) - - diff --git a/saasus_sdk_python/models/auth_info.py b/saasus_sdk_python/models/auth_info.py deleted file mode 100644 index 9426575..0000000 --- a/saasus_sdk_python/models/auth_info.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class AuthInfo(BaseModel): - """ - AuthInfo - """ - callback_url: StrictStr = Field(..., description="認証後遷移先(Redirect After Authentication)") - __properties = ["callback_url"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> AuthInfo: - """Create an instance of AuthInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> AuthInfo: - """Create an instance of AuthInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return AuthInfo.parse_obj(obj) - - _obj = AuthInfo.parse_obj({ - "callback_url": obj.get("callback_url") - }) - return _obj - - diff --git a/saasus_sdk_python/models/authorization_temp_code.py b/saasus_sdk_python/models/authorization_temp_code.py deleted file mode 100644 index 3e697cf..0000000 --- a/saasus_sdk_python/models/authorization_temp_code.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class AuthorizationTempCode(BaseModel): - """ - AuthorizationTempCode - """ - code: StrictStr = Field(...) - __properties = ["code"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> AuthorizationTempCode: - """Create an instance of AuthorizationTempCode from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> AuthorizationTempCode: - """Create an instance of AuthorizationTempCode from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return AuthorizationTempCode.parse_obj(obj) - - _obj = AuthorizationTempCode.parse_obj({ - "code": obj.get("code") - }) - return _obj - - diff --git a/saasus_sdk_python/models/basic_info.py b/saasus_sdk_python/models/basic_info.py deleted file mode 100644 index c9eec9d..0000000 --- a/saasus_sdk_python/models/basic_info.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist -from saasus_sdk_python.models.dns_record import DnsRecord - -class BasicInfo(BaseModel): - """ - BasicInfo - """ - domain_name: StrictStr = Field(..., description="ドメイン名(Domain Name)") - is_dns_validated: StrictBool = Field(..., description="DNSレコードの検証結果(DNS Record Verification Results)") - certificate_dns_record: DnsRecord = Field(...) - cloud_front_dns_record: DnsRecord = Field(...) - dkim_dns_records: conlist(DnsRecord) = Field(..., description="DKIM DNS レコード(DKIM DNS Records)") - default_domain_name: StrictStr = Field(..., description="デフォルトドメイン名(Default Domain Name)") - from_email_address: StrictStr = Field(..., description="認証メールの送信元メールアドレス(Sender Email for Authentication Email)") - reply_email_address: StrictStr = Field(..., description="認証メールの返信元メールアドレス(Reply-from email address of authentication email)") - is_ses_sandbox_granted: StrictBool = Field(..., description="SESのサンドボックス解除及びCognitoのSES設定結果(SES sandbox release and Cognito SES configuration results)") - __properties = ["domain_name", "is_dns_validated", "certificate_dns_record", "cloud_front_dns_record", "dkim_dns_records", "default_domain_name", "from_email_address", "reply_email_address", "is_ses_sandbox_granted"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> BasicInfo: - """Create an instance of BasicInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of certificate_dns_record - if self.certificate_dns_record: - _dict['certificate_dns_record'] = self.certificate_dns_record.to_dict() - # override the default output from pydantic by calling `to_dict()` of cloud_front_dns_record - if self.cloud_front_dns_record: - _dict['cloud_front_dns_record'] = self.cloud_front_dns_record.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in dkim_dns_records (list) - _items = [] - if self.dkim_dns_records: - for _item in self.dkim_dns_records: - if _item: - _items.append(_item.to_dict()) - _dict['dkim_dns_records'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> BasicInfo: - """Create an instance of BasicInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return BasicInfo.parse_obj(obj) - - _obj = BasicInfo.parse_obj({ - "domain_name": obj.get("domain_name"), - "is_dns_validated": obj.get("is_dns_validated"), - "certificate_dns_record": DnsRecord.from_dict(obj.get("certificate_dns_record")) if obj.get("certificate_dns_record") is not None else None, - "cloud_front_dns_record": DnsRecord.from_dict(obj.get("cloud_front_dns_record")) if obj.get("cloud_front_dns_record") is not None else None, - "dkim_dns_records": [DnsRecord.from_dict(_item) for _item in obj.get("dkim_dns_records")] if obj.get("dkim_dns_records") is not None else None, - "default_domain_name": obj.get("default_domain_name"), - "from_email_address": obj.get("from_email_address"), - "reply_email_address": obj.get("reply_email_address"), - "is_ses_sandbox_granted": obj.get("is_ses_sandbox_granted") - }) - return _obj - - diff --git a/saasus_sdk_python/models/billing_address.py b/saasus_sdk_python/models/billing_address.py deleted file mode 100644 index f3779e7..0000000 --- a/saasus_sdk_python/models/billing_address.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictStr, constr, validator - -class BillingAddress(BaseModel): - """ - BillingAddress - """ - street: StrictStr = Field(..., description="住所の通りの名前や番地を含めた部分 Street address, apartment or suite number. ") - city: StrictStr = Field(..., description="住所の市区町村 City, district, suburb, town, or village. ") - state: StrictStr = Field(..., description="住所の都道府県または州 State name or abbreviation. ") - country: constr(strict=True) = Field(..., description="住所の国を ISO 3166-1 alpha-2 コードで指定します。 Country of the address using ISO 3166-1 alpha-2 code. ") - additional_address_info: Optional[StrictStr] = Field(None, description="建物名・部屋番号などの住所に関する追加情報 Additional information about the address, such as a building name, floor, or department name. ") - postal_code: StrictStr = Field(..., description="郵便番号 ZIP or postal code. ") - __properties = ["street", "city", "state", "country", "additional_address_info", "postal_code"] - - @validator('country') - def country_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[A-Z]{2}$", value): - raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> BillingAddress: - """Create an instance of BillingAddress from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> BillingAddress: - """Create an instance of BillingAddress from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return BillingAddress.parse_obj(obj) - - _obj = BillingAddress.parse_obj({ - "street": obj.get("street"), - "city": obj.get("city"), - "state": obj.get("state"), - "country": obj.get("country"), - "additional_address_info": obj.get("additional_address_info"), - "postal_code": obj.get("postal_code") - }) - return _obj - - diff --git a/saasus_sdk_python/models/billing_info.py b/saasus_sdk_python/models/billing_info.py deleted file mode 100644 index 51eee68..0000000 --- a/saasus_sdk_python/models/billing_info.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr -from saasus_sdk_python.models.billing_address import BillingAddress -from saasus_sdk_python.models.invoice_language import InvoiceLanguage - -class BillingInfo(BaseModel): - """ - BillingInfo - """ - name: StrictStr = Field(..., description="請求用のテナント名 Tenant name for billing ") - address: BillingAddress = Field(...) - invoice_language: InvoiceLanguage = Field(...) - __properties = ["name", "address", "invoice_language"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> BillingInfo: - """Create an instance of BillingInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of address - if self.address: - _dict['address'] = self.address.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> BillingInfo: - """Create an instance of BillingInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return BillingInfo.parse_obj(obj) - - _obj = BillingInfo.parse_obj({ - "name": obj.get("name"), - "address": BillingAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, - "invoice_language": obj.get("invoice_language") - }) - return _obj - - diff --git a/saasus_sdk_python/models/client_secret.py b/saasus_sdk_python/models/client_secret.py deleted file mode 100644 index 73c3a14..0000000 --- a/saasus_sdk_python/models/client_secret.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class ClientSecret(BaseModel): - """ - ClientSecret - """ - client_secret: StrictStr = Field(..., description="クライアントシークレット(client secret)") - __properties = ["client_secret"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ClientSecret: - """Create an instance of ClientSecret from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ClientSecret: - """Create an instance of ClientSecret from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ClientSecret.parse_obj(obj) - - _obj = ClientSecret.parse_obj({ - "client_secret": obj.get("client_secret") - }) - return _obj - - diff --git a/saasus_sdk_python/models/confirm_sign_up_with_aws_marketplace_param.py b/saasus_sdk_python/models/confirm_sign_up_with_aws_marketplace_param.py deleted file mode 100644 index e4a12d7..0000000 --- a/saasus_sdk_python/models/confirm_sign_up_with_aws_marketplace_param.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class ConfirmSignUpWithAwsMarketplaceParam(BaseModel): - """ - ConfirmSignUpWithAwsMarketplaceParam - """ - tenant_name: Optional[StrictStr] = Field(None, description="テナント名(tenant name)") - access_token: StrictStr = Field(..., description="アクセストークン(access token)") - registration_token: StrictStr = Field(..., description="Registration Token") - __properties = ["tenant_name", "access_token", "registration_token"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ConfirmSignUpWithAwsMarketplaceParam: - """Create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ConfirmSignUpWithAwsMarketplaceParam: - """Create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ConfirmSignUpWithAwsMarketplaceParam.parse_obj(obj) - - _obj = ConfirmSignUpWithAwsMarketplaceParam.parse_obj({ - "tenant_name": obj.get("tenant_name"), - "access_token": obj.get("access_token"), - "registration_token": obj.get("registration_token") - }) - return _obj - - diff --git a/saasus_sdk_python/models/create_saas_user_param.py b/saasus_sdk_python/models/create_saas_user_param.py deleted file mode 100644 index 9b888a4..0000000 --- a/saasus_sdk_python/models/create_saas_user_param.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class CreateSaasUserParam(BaseModel): - """ - CreateSaasUserParam - """ - email: StrictStr = Field(..., description="メールアドレス(E-mail)") - password: StrictStr = Field(..., description="パスワード(Password)") - __properties = ["email", "password"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CreateSaasUserParam: - """Create an instance of CreateSaasUserParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CreateSaasUserParam: - """Create an instance of CreateSaasUserParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CreateSaasUserParam.parse_obj(obj) - - _obj = CreateSaasUserParam.parse_obj({ - "email": obj.get("email"), - "password": obj.get("password") - }) - return _obj - - diff --git a/saasus_sdk_python/models/create_secret_code_param.py b/saasus_sdk_python/models/create_secret_code_param.py deleted file mode 100644 index 7ec9c6b..0000000 --- a/saasus_sdk_python/models/create_secret_code_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class CreateSecretCodeParam(BaseModel): - """ - CreateSecretCodeParam - """ - access_token: StrictStr = Field(..., description="アクセストークン(access token)") - __properties = ["access_token"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CreateSecretCodeParam: - """Create an instance of CreateSecretCodeParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CreateSecretCodeParam: - """Create an instance of CreateSecretCodeParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CreateSecretCodeParam.parse_obj(obj) - - _obj = CreateSecretCodeParam.parse_obj({ - "access_token": obj.get("access_token") - }) - return _obj - - diff --git a/saasus_sdk_python/models/create_tenant_user_param.py b/saasus_sdk_python/models/create_tenant_user_param.py deleted file mode 100644 index f625436..0000000 --- a/saasus_sdk_python/models/create_tenant_user_param.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict -from pydantic import BaseModel, Field, StrictStr - -class CreateTenantUserParam(BaseModel): - """ - CreateTenantUserParam - """ - email: StrictStr = Field(..., description="メールアドレス(e-mail)") - attributes: Dict[str, Any] = Field(..., description="属性情報(SaaS 開発コンソールでユーザー属性定義を行い設定された情報を取得します) Attribute information (Get information set by defining user attributes in the SaaS development console) ") - __properties = ["email", "attributes"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CreateTenantUserParam: - """Create an instance of CreateTenantUserParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CreateTenantUserParam: - """Create an instance of CreateTenantUserParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CreateTenantUserParam.parse_obj(obj) - - _obj = CreateTenantUserParam.parse_obj({ - "email": obj.get("email"), - "attributes": obj.get("attributes") - }) - return _obj - - diff --git a/saasus_sdk_python/models/create_tenant_user_roles_param.py b/saasus_sdk_python/models/create_tenant_user_roles_param.py deleted file mode 100644 index e2e4050..0000000 --- a/saasus_sdk_python/models/create_tenant_user_roles_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, StrictStr, conlist - -class CreateTenantUserRolesParam(BaseModel): - """ - CreateTenantUserRolesParam - """ - role_names: conlist(StrictStr) = Field(..., description="役割(ロール)情報(Role Info)") - __properties = ["role_names"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CreateTenantUserRolesParam: - """Create an instance of CreateTenantUserRolesParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CreateTenantUserRolesParam: - """Create an instance of CreateTenantUserRolesParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CreateTenantUserRolesParam.parse_obj(obj) - - _obj = CreateTenantUserRolesParam.parse_obj({ - "role_names": obj.get("role_names") - }) - return _obj - - diff --git a/saasus_sdk_python/models/credentials.py b/saasus_sdk_python/models/credentials.py deleted file mode 100644 index e8fed83..0000000 --- a/saasus_sdk_python/models/credentials.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class Credentials(BaseModel): - """ - Credentials - """ - id_token: StrictStr = Field(..., description="IDトークン(ID token)") - access_token: StrictStr = Field(..., description="アクセストークン(access token)") - refresh_token: Optional[StrictStr] = Field(None, description="リフレッシュトークン(refresh token)") - __properties = ["id_token", "access_token", "refresh_token"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Credentials: - """Create an instance of Credentials from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Credentials: - """Create an instance of Credentials from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Credentials.parse_obj(obj) - - _obj = Credentials.parse_obj({ - "id_token": obj.get("id_token"), - "access_token": obj.get("access_token"), - "refresh_token": obj.get("refresh_token") - }) - return _obj - - diff --git a/saasus_sdk_python/models/customize_page_props.py b/saasus_sdk_python/models/customize_page_props.py deleted file mode 100644 index c137f44..0000000 --- a/saasus_sdk_python/models/customize_page_props.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictBool, StrictStr - -class CustomizePageProps(BaseModel): - """ - CustomizePageProps - """ - html_contents: StrictStr = Field(..., description="画面のHTMLを編集できます ※ 未提供の機能のため、変更・保存はできません Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. ") - is_terms_of_service: StrictBool = Field(..., description="利用規約の同意チェックボックスを表示するが設定されているか(display the terms of use agreement check box)") - is_privacy_policy: StrictBool = Field(..., description="プライバシーポリシーチェックボックスを表示するが設定されているか(show the privacy policy checkbox)") - __properties = ["html_contents", "is_terms_of_service", "is_privacy_policy"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CustomizePageProps: - """Create an instance of CustomizePageProps from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CustomizePageProps: - """Create an instance of CustomizePageProps from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CustomizePageProps.parse_obj(obj) - - _obj = CustomizePageProps.parse_obj({ - "html_contents": obj.get("html_contents"), - "is_terms_of_service": obj.get("is_terms_of_service"), - "is_privacy_policy": obj.get("is_privacy_policy") - }) - return _obj - - diff --git a/saasus_sdk_python/models/customize_page_settings.py b/saasus_sdk_python/models/customize_page_settings.py deleted file mode 100644 index db69289..0000000 --- a/saasus_sdk_python/models/customize_page_settings.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class CustomizePageSettings(BaseModel): - """ - CustomizePageSettings - """ - title: StrictStr = Field(..., description="サービス名(service name)") - terms_of_service_url: StrictStr = Field(..., description="利用規約URL(terms of service URL)") - privacy_policy_url: StrictStr = Field(..., description="プライバシーポリシーURL(privacy policy URL)") - google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager コンテナ ID(Google Tag Manager container ID)") - icon: StrictStr = Field(..., description="サービスアイコン(service icon)") - favicon: StrictStr = Field(..., description="ファビコン(favicon)") - __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id", "icon", "favicon"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CustomizePageSettings: - """Create an instance of CustomizePageSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CustomizePageSettings: - """Create an instance of CustomizePageSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CustomizePageSettings.parse_obj(obj) - - _obj = CustomizePageSettings.parse_obj({ - "title": obj.get("title"), - "terms_of_service_url": obj.get("terms_of_service_url"), - "privacy_policy_url": obj.get("privacy_policy_url"), - "google_tag_manager_container_id": obj.get("google_tag_manager_container_id"), - "icon": obj.get("icon"), - "favicon": obj.get("favicon") - }) - return _obj - - diff --git a/saasus_sdk_python/models/customize_page_settings_props.py b/saasus_sdk_python/models/customize_page_settings_props.py deleted file mode 100644 index 1b61fd3..0000000 --- a/saasus_sdk_python/models/customize_page_settings_props.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class CustomizePageSettingsProps(BaseModel): - """ - CustomizePageSettingsProps - """ - title: StrictStr = Field(..., description="サービス名(service name)") - terms_of_service_url: StrictStr = Field(..., description="利用規約URL(terms of service URL)") - privacy_policy_url: StrictStr = Field(..., description="プライバシーポリシーURL(privacy policy URL)") - google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager コンテナ ID(Google Tag Manager container ID)") - __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CustomizePageSettingsProps: - """Create an instance of CustomizePageSettingsProps from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CustomizePageSettingsProps: - """Create an instance of CustomizePageSettingsProps from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CustomizePageSettingsProps.parse_obj(obj) - - _obj = CustomizePageSettingsProps.parse_obj({ - "title": obj.get("title"), - "terms_of_service_url": obj.get("terms_of_service_url"), - "privacy_policy_url": obj.get("privacy_policy_url"), - "google_tag_manager_container_id": obj.get("google_tag_manager_container_id") - }) - return _obj - - diff --git a/saasus_sdk_python/models/customize_pages.py b/saasus_sdk_python/models/customize_pages.py deleted file mode 100644 index 3f0be8f..0000000 --- a/saasus_sdk_python/models/customize_pages.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field -from saasus_sdk_python.models.customize_page_props import CustomizePageProps - -class CustomizePages(BaseModel): - """ - CustomizePages - """ - sign_up_page: CustomizePageProps = Field(...) - sign_in_page: CustomizePageProps = Field(...) - password_reset_page: CustomizePageProps = Field(...) - __properties = ["sign_up_page", "sign_in_page", "password_reset_page"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CustomizePages: - """Create an instance of CustomizePages from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of sign_up_page - if self.sign_up_page: - _dict['sign_up_page'] = self.sign_up_page.to_dict() - # override the default output from pydantic by calling `to_dict()` of sign_in_page - if self.sign_in_page: - _dict['sign_in_page'] = self.sign_in_page.to_dict() - # override the default output from pydantic by calling `to_dict()` of password_reset_page - if self.password_reset_page: - _dict['password_reset_page'] = self.password_reset_page.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CustomizePages: - """Create an instance of CustomizePages from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CustomizePages.parse_obj(obj) - - _obj = CustomizePages.parse_obj({ - "sign_up_page": CustomizePageProps.from_dict(obj.get("sign_up_page")) if obj.get("sign_up_page") is not None else None, - "sign_in_page": CustomizePageProps.from_dict(obj.get("sign_in_page")) if obj.get("sign_in_page") is not None else None, - "password_reset_page": CustomizePageProps.from_dict(obj.get("password_reset_page")) if obj.get("password_reset_page") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/device_configuration.py b/saasus_sdk_python/models/device_configuration.py deleted file mode 100644 index 3764fa4..0000000 --- a/saasus_sdk_python/models/device_configuration.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr, validator - -class DeviceConfiguration(BaseModel): - """ - 信頼済みデバイスの記憶の設定(settings for remembering trusted devices) - """ - device_remembering: StrictStr = Field(..., description="always: 常に記憶する(always remember) userOptIn: ユーザーオプトイン(user opt-in) no: (don't save) ") - __properties = ["device_remembering"] - - @validator('device_remembering') - def device_remembering_validate_enum(cls, value): - """Validates the enum""" - if value not in ('always', 'userOptIn', 'no'): - raise ValueError("must be one of enum values ('always', 'userOptIn', 'no')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> DeviceConfiguration: - """Create an instance of DeviceConfiguration from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> DeviceConfiguration: - """Create an instance of DeviceConfiguration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return DeviceConfiguration.parse_obj(obj) - - _obj = DeviceConfiguration.parse_obj({ - "device_remembering": obj.get("device_remembering") - }) - return _obj - - diff --git a/saasus_sdk_python/models/dns_record.py b/saasus_sdk_python/models/dns_record.py deleted file mode 100644 index 6b73749..0000000 --- a/saasus_sdk_python/models/dns_record.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr, validator - -class DnsRecord(BaseModel): - """ - DnsRecord - """ - type: StrictStr = Field(..., description="CNAMEリソースレコード(CNAME Resource Record)") - name: StrictStr = Field(..., description="レコード名(Record Name)") - value: StrictStr = Field(..., description="値(Value)") - __properties = ["type", "name", "value"] - - @validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in ('CNAME'): - raise ValueError("must be one of enum values ('CNAME')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> DnsRecord: - """Create an instance of DnsRecord from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> DnsRecord: - """Create an instance of DnsRecord from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return DnsRecord.parse_obj(obj) - - _obj = DnsRecord.parse_obj({ - "type": obj.get("type"), - "name": obj.get("name"), - "value": obj.get("value") - }) - return _obj - - diff --git a/saasus_sdk_python/models/env.py b/saasus_sdk_python/models/env.py deleted file mode 100644 index eb45444..0000000 --- a/saasus_sdk_python/models/env.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictInt, StrictStr - -class Env(BaseModel): - """ - 環境情報(env info) - """ - id: StrictInt = Field(...) - name: StrictStr = Field(..., description="環境名(env name)") - __properties = ["id", "name"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Env: - """Create an instance of Env from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Env: - """Create an instance of Env from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Env.parse_obj(obj) - - _obj = Env.parse_obj({ - "id": obj.get("id"), - "name": obj.get("name") - }) - return _obj - - diff --git a/saasus_sdk_python/models/envs.py b/saasus_sdk_python/models/envs.py deleted file mode 100644 index 4458767..0000000 --- a/saasus_sdk_python/models/envs.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.env import Env - -class Envs(BaseModel): - """ - env一覧(env list) - """ - envs: conlist(Env) = Field(...) - __properties = ["envs"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Envs: - """Create an instance of Envs from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in envs (list) - _items = [] - if self.envs: - for _item in self.envs: - if _item: - _items.append(_item.to_dict()) - _dict['envs'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Envs: - """Create an instance of Envs from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Envs.parse_obj(obj) - - _obj = Envs.parse_obj({ - "envs": [Env.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/error.py b/saasus_sdk_python/models/error.py deleted file mode 100644 index a5bb0d6..0000000 --- a/saasus_sdk_python/models/error.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict, Optional -from pydantic import BaseModel, Field, StrictStr - -class Error(BaseModel): - """ - Error - """ - type: StrictStr = Field(..., description="permission_denied") - message: StrictStr = Field(..., description="Error message") - data: Optional[Dict[str, Any]] = None - __properties = ["type", "message", "data"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Error: - """Create an instance of Error from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Error: - """Create an instance of Error from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Error.parse_obj(obj) - - _obj = Error.parse_obj({ - "type": obj.get("type"), - "message": obj.get("message"), - "data": obj.get("data") - }) - return _obj - - diff --git a/saasus_sdk_python/models/identity_provider_configuration.py b/saasus_sdk_python/models/identity_provider_configuration.py deleted file mode 100644 index ef51b7f..0000000 --- a/saasus_sdk_python/models/identity_provider_configuration.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class IdentityProviderConfiguration(BaseModel): - """ - 外部IDプロバイダを利用したサインインの設定をするために必要な情報です。(This information is required to set up sign-in using an external identity provider.) 変更はできません。(It cannot be changed.) - """ - domain: StrictStr = Field(..., description="ドメイン(domain)") - redirect_url: StrictStr = Field(..., description="リダイレクトURL(redirect URL)") - __properties = ["domain", "redirect_url"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> IdentityProviderConfiguration: - """Create an instance of IdentityProviderConfiguration from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> IdentityProviderConfiguration: - """Create an instance of IdentityProviderConfiguration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return IdentityProviderConfiguration.parse_obj(obj) - - _obj = IdentityProviderConfiguration.parse_obj({ - "domain": obj.get("domain"), - "redirect_url": obj.get("redirect_url") - }) - return _obj - - diff --git a/saasus_sdk_python/models/identity_provider_props.py b/saasus_sdk_python/models/identity_provider_props.py deleted file mode 100644 index 3e954b4..0000000 --- a/saasus_sdk_python/models/identity_provider_props.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class IdentityProviderProps(BaseModel): - """ - IdentityProviderProps - """ - application_id: StrictStr = Field(...) - application_secret: StrictStr = Field(...) - approval_scope: StrictStr = Field(...) - __properties = ["application_id", "application_secret", "approval_scope"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> IdentityProviderProps: - """Create an instance of IdentityProviderProps from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> IdentityProviderProps: - """Create an instance of IdentityProviderProps from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return IdentityProviderProps.parse_obj(obj) - - _obj = IdentityProviderProps.parse_obj({ - "application_id": obj.get("application_id"), - "application_secret": obj.get("application_secret"), - "approval_scope": obj.get("approval_scope") - }) - return _obj - - diff --git a/saasus_sdk_python/models/identity_providers.py b/saasus_sdk_python/models/identity_providers.py deleted file mode 100644 index 0fd09c5..0000000 --- a/saasus_sdk_python/models/identity_providers.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field -from saasus_sdk_python.models.identity_provider_props import IdentityProviderProps - -class IdentityProviders(BaseModel): - """ - IdentityProviders - """ - google: IdentityProviderProps = Field(...) - __properties = ["google"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> IdentityProviders: - """Create an instance of IdentityProviders from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of google - if self.google: - _dict['google'] = self.google.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> IdentityProviders: - """Create an instance of IdentityProviders from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return IdentityProviders.parse_obj(obj) - - _obj = IdentityProviders.parse_obj({ - "google": IdentityProviderProps.from_dict(obj.get("google")) if obj.get("google") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/invoice_language.py b/saasus_sdk_python/models/invoice_language.py deleted file mode 100644 index 824264d..0000000 --- a/saasus_sdk_python/models/invoice_language.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - - - - -class InvoiceLanguage(str, Enum): - """ - 請求書の言語 Language of invoice - """ - - """ - allowed enum values - """ - JA_MINUS_JP = 'ja-JP' - EN_MINUS_US = 'en-US' - - @classmethod - def from_json(cls, json_str: str) -> InvoiceLanguage: - """Create an instance of InvoiceLanguage from a JSON string""" - return InvoiceLanguage(json.loads(json_str)) - - diff --git a/saasus_sdk_python/models/link_aws_marketplace_param.py b/saasus_sdk_python/models/link_aws_marketplace_param.py deleted file mode 100644 index 877a9ae..0000000 --- a/saasus_sdk_python/models/link_aws_marketplace_param.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class LinkAwsMarketplaceParam(BaseModel): - """ - LinkAwsMarketplaceParam - """ - tenant_id: StrictStr = Field(..., description="テナントID(tenant ID)") - access_token: StrictStr = Field(..., description="アクセストークン(access token)") - registration_token: StrictStr = Field(..., description="Registration Token") - __properties = ["tenant_id", "access_token", "registration_token"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> LinkAwsMarketplaceParam: - """Create an instance of LinkAwsMarketplaceParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> LinkAwsMarketplaceParam: - """Create an instance of LinkAwsMarketplaceParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return LinkAwsMarketplaceParam.parse_obj(obj) - - _obj = LinkAwsMarketplaceParam.parse_obj({ - "tenant_id": obj.get("tenant_id"), - "access_token": obj.get("access_token"), - "registration_token": obj.get("registration_token") - }) - return _obj - - diff --git a/saasus_sdk_python/models/message_template.py b/saasus_sdk_python/models/message_template.py deleted file mode 100644 index 6a56593..0000000 --- a/saasus_sdk_python/models/message_template.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class MessageTemplate(BaseModel): - """ - MessageTemplate - """ - subject: StrictStr = Field(..., description="タイトル(title)") - message: StrictStr = Field(..., description="メッセージ(message)") - __properties = ["subject", "message"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MessageTemplate: - """Create an instance of MessageTemplate from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MessageTemplate: - """Create an instance of MessageTemplate from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MessageTemplate.parse_obj(obj) - - _obj = MessageTemplate.parse_obj({ - "subject": obj.get("subject"), - "message": obj.get("message") - }) - return _obj - - diff --git a/saasus_sdk_python/models/mfa_configuration.py b/saasus_sdk_python/models/mfa_configuration.py deleted file mode 100644 index bf1eb16..0000000 --- a/saasus_sdk_python/models/mfa_configuration.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr, validator - -class MfaConfiguration(BaseModel): - """ - MFAデバイス認証設定(MFA device authentication settings) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) - """ - mfa_configuration: StrictStr = Field(..., description="on: 全ユーザーがログイン時に適用(apply when all users log in) optional: MFA要素が有効になっている個別ユーザーに適用(apply to individual users with MFA factor enabled) ※ パラメータは現在optionalで固定となります。(The parameter is currently optional and fixed.) ") - __properties = ["mfa_configuration"] - - @validator('mfa_configuration') - def mfa_configuration_validate_enum(cls, value): - """Validates the enum""" - if value not in ('on', 'optional'): - raise ValueError("must be one of enum values ('on', 'optional')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MfaConfiguration: - """Create an instance of MfaConfiguration from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MfaConfiguration: - """Create an instance of MfaConfiguration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MfaConfiguration.parse_obj(obj) - - _obj = MfaConfiguration.parse_obj({ - "mfa_configuration": obj.get("mfa_configuration") - }) - return _obj - - diff --git a/saasus_sdk_python/models/mfa_preference.py b/saasus_sdk_python/models/mfa_preference.py deleted file mode 100644 index b7d3991..0000000 --- a/saasus_sdk_python/models/mfa_preference.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictBool, StrictStr, validator - -class MfaPreference(BaseModel): - """ - MfaPreference - """ - enabled: StrictBool = Field(..., description="MFAを有効にするか否か(enable MFA)") - method: Optional[StrictStr] = Field(None, description="MFAの方法(enabledがtrueの場合は必須)(MFA method (required if enabled is true))") - __properties = ["enabled", "method"] - - @validator('method') - def method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in ('softwareToken'): - raise ValueError("must be one of enum values ('softwareToken')") - return value - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MfaPreference: - """Create an instance of MfaPreference from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MfaPreference: - """Create an instance of MfaPreference from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MfaPreference.parse_obj(obj) - - _obj = MfaPreference.parse_obj({ - "enabled": obj.get("enabled"), - "method": obj.get("method") - }) - return _obj - - diff --git a/saasus_sdk_python/models/notification_messages.py b/saasus_sdk_python/models/notification_messages.py deleted file mode 100644 index d5e15e2..0000000 --- a/saasus_sdk_python/models/notification_messages.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field -from saasus_sdk_python.models.message_template import MessageTemplate - -class NotificationMessages(BaseModel): - """ - NotificationMessages - """ - sign_up: MessageTemplate = Field(...) - create_user: MessageTemplate = Field(...) - resend_code: MessageTemplate = Field(...) - forgot_password: MessageTemplate = Field(...) - update_user_attribute: MessageTemplate = Field(...) - verify_user_attribute: MessageTemplate = Field(...) - authentication_mfa: MessageTemplate = Field(...) - __properties = ["sign_up", "create_user", "resend_code", "forgot_password", "update_user_attribute", "verify_user_attribute", "authentication_mfa"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> NotificationMessages: - """Create an instance of NotificationMessages from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of sign_up - if self.sign_up: - _dict['sign_up'] = self.sign_up.to_dict() - # override the default output from pydantic by calling `to_dict()` of create_user - if self.create_user: - _dict['create_user'] = self.create_user.to_dict() - # override the default output from pydantic by calling `to_dict()` of resend_code - if self.resend_code: - _dict['resend_code'] = self.resend_code.to_dict() - # override the default output from pydantic by calling `to_dict()` of forgot_password - if self.forgot_password: - _dict['forgot_password'] = self.forgot_password.to_dict() - # override the default output from pydantic by calling `to_dict()` of update_user_attribute - if self.update_user_attribute: - _dict['update_user_attribute'] = self.update_user_attribute.to_dict() - # override the default output from pydantic by calling `to_dict()` of verify_user_attribute - if self.verify_user_attribute: - _dict['verify_user_attribute'] = self.verify_user_attribute.to_dict() - # override the default output from pydantic by calling `to_dict()` of authentication_mfa - if self.authentication_mfa: - _dict['authentication_mfa'] = self.authentication_mfa.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> NotificationMessages: - """Create an instance of NotificationMessages from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return NotificationMessages.parse_obj(obj) - - _obj = NotificationMessages.parse_obj({ - "sign_up": MessageTemplate.from_dict(obj.get("sign_up")) if obj.get("sign_up") is not None else None, - "create_user": MessageTemplate.from_dict(obj.get("create_user")) if obj.get("create_user") is not None else None, - "resend_code": MessageTemplate.from_dict(obj.get("resend_code")) if obj.get("resend_code") is not None else None, - "forgot_password": MessageTemplate.from_dict(obj.get("forgot_password")) if obj.get("forgot_password") is not None else None, - "update_user_attribute": MessageTemplate.from_dict(obj.get("update_user_attribute")) if obj.get("update_user_attribute") is not None else None, - "verify_user_attribute": MessageTemplate.from_dict(obj.get("verify_user_attribute")) if obj.get("verify_user_attribute") is not None else None, - "authentication_mfa": MessageTemplate.from_dict(obj.get("authentication_mfa")) if obj.get("authentication_mfa") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/password_policy.py b/saasus_sdk_python/models/password_policy.py deleted file mode 100644 index 8fe1db2..0000000 --- a/saasus_sdk_python/models/password_policy.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictBool, StrictInt - -class PasswordPolicy(BaseModel): - """ - パスワードポリシー(password policy) - """ - minimum_length: StrictInt = Field(..., description="最小文字数(minimum number of characters)") - is_require_lowercase: StrictBool = Field(..., description="一文字以上の小文字を含むが設定されているか(contains one or more lowercase characters)") - is_require_numbers: StrictBool = Field(..., description="一文字以上の数字を含むが設定されているか(contains one or more numeric characters)") - is_require_symbols: StrictBool = Field(..., description="一文字以上の特殊文字を含むが設定されているか(contains one or more special characters)") - is_require_uppercase: StrictBool = Field(..., description="一文字以上の大文字を含むが設定されているか(contains one or more uppercase letters)") - temporary_password_validity_days: StrictInt = Field(..., description="仮パスワードの有効期限(temporary password expiration date)") - __properties = ["minimum_length", "is_require_lowercase", "is_require_numbers", "is_require_symbols", "is_require_uppercase", "temporary_password_validity_days"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PasswordPolicy: - """Create an instance of PasswordPolicy from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PasswordPolicy: - """Create an instance of PasswordPolicy from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PasswordPolicy.parse_obj(obj) - - _obj = PasswordPolicy.parse_obj({ - "minimum_length": obj.get("minimum_length"), - "is_require_lowercase": obj.get("is_require_lowercase"), - "is_require_numbers": obj.get("is_require_numbers"), - "is_require_symbols": obj.get("is_require_symbols"), - "is_require_uppercase": obj.get("is_require_uppercase"), - "temporary_password_validity_days": obj.get("temporary_password_validity_days") - }) - return _obj - - diff --git a/saasus_sdk_python/models/plan_histories.py b/saasus_sdk_python/models/plan_histories.py deleted file mode 100644 index 4e90142..0000000 --- a/saasus_sdk_python/models/plan_histories.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.plan_history import PlanHistory - -class PlanHistories(BaseModel): - """ - PlanHistories - """ - plan_histories: conlist(PlanHistory) = Field(..., description="料金プラン履歴") - __properties = ["plan_histories"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PlanHistories: - """Create an instance of PlanHistories from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) - _items = [] - if self.plan_histories: - for _item in self.plan_histories: - if _item: - _items.append(_item.to_dict()) - _dict['plan_histories'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PlanHistories: - """Create an instance of PlanHistories from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PlanHistories.parse_obj(obj) - - _obj = PlanHistories.parse_obj({ - "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/plan_history.py b/saasus_sdk_python/models/plan_history.py deleted file mode 100644 index aa4b772..0000000 --- a/saasus_sdk_python/models/plan_history.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr - -class PlanHistory(BaseModel): - """ - PlanHistory - """ - plan_id: StrictStr = Field(...) - plan_applied_at: StrictInt = Field(..., description="登録日時") - tax_rate_id: Optional[StrictStr] = None - __properties = ["plan_id", "plan_applied_at", "tax_rate_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PlanHistory: - """Create an instance of PlanHistory from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PlanHistory: - """Create an instance of PlanHistory from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PlanHistory.parse_obj(obj) - - _obj = PlanHistory.parse_obj({ - "plan_id": obj.get("plan_id"), - "plan_applied_at": obj.get("plan_applied_at"), - "tax_rate_id": obj.get("tax_rate_id") - }) - return _obj - - diff --git a/saasus_sdk_python/models/plan_reservation.py b/saasus_sdk_python/models/plan_reservation.py deleted file mode 100644 index 99e1052..0000000 --- a/saasus_sdk_python/models/plan_reservation.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr - -class PlanReservation(BaseModel): - """ - PlanReservation - """ - next_plan_id: Optional[StrictStr] = None - using_next_plan_from: Optional[StrictInt] = Field(None, description="次回料金プラン開始日時(stripe連携時、当月月初の0時(UTC)を指定すると当月月初開始のサブスクリプションを作成できます。ex. 2023年1月の場合は、1672531200 ) (Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)) ") - next_plan_tax_rate_id: Optional[StrictStr] = None - __properties = ["next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PlanReservation: - """Create an instance of PlanReservation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PlanReservation: - """Create an instance of PlanReservation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PlanReservation.parse_obj(obj) - - _obj = PlanReservation.parse_obj({ - "next_plan_id": obj.get("next_plan_id"), - "using_next_plan_from": obj.get("using_next_plan_from"), - "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id") - }) - return _obj - - diff --git a/saasus_sdk_python/models/provider_name.py b/saasus_sdk_python/models/provider_name.py deleted file mode 100644 index 35031cb..0000000 --- a/saasus_sdk_python/models/provider_name.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - - - - -class ProviderName(str, Enum): - """ - ProviderName - """ - - """ - allowed enum values - """ - GOOGLE = 'Google' - - @classmethod - def from_json(cls, json_str: str) -> ProviderName: - """Create an instance of ProviderName from a JSON string""" - return ProviderName(json.loads(json_str)) - - diff --git a/saasus_sdk_python/models/recaptcha_props.py b/saasus_sdk_python/models/recaptcha_props.py deleted file mode 100644 index 269c09a..0000000 --- a/saasus_sdk_python/models/recaptcha_props.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class RecaptchaProps(BaseModel): - """ - reCAPTCHA認証設定(reCAPTCHA authentication settings) ※ 未提供の機能のため、変更・保存はできません(This function is not yet provided, so it cannot be changed or saved.) - """ - site_key: StrictStr = Field(..., description="サイトキー(site key)") - secret_key: StrictStr = Field(..., description="シークレットキー(secret key)") - __properties = ["site_key", "secret_key"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> RecaptchaProps: - """Create an instance of RecaptchaProps from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> RecaptchaProps: - """Create an instance of RecaptchaProps from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return RecaptchaProps.parse_obj(obj) - - _obj = RecaptchaProps.parse_obj({ - "site_key": obj.get("site_key"), - "secret_key": obj.get("secret_key") - }) - return _obj - - diff --git a/saasus_sdk_python/models/resend_sign_up_confirmation_email_param.py b/saasus_sdk_python/models/resend_sign_up_confirmation_email_param.py deleted file mode 100644 index f4013ef..0000000 --- a/saasus_sdk_python/models/resend_sign_up_confirmation_email_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class ResendSignUpConfirmationEmailParam(BaseModel): - """ - ResendSignUpConfirmationEmailParam - """ - email: StrictStr = Field(..., description="メールアドレス(Email Address)") - __properties = ["email"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ResendSignUpConfirmationEmailParam: - """Create an instance of ResendSignUpConfirmationEmailParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ResendSignUpConfirmationEmailParam: - """Create an instance of ResendSignUpConfirmationEmailParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ResendSignUpConfirmationEmailParam.parse_obj(obj) - - _obj = ResendSignUpConfirmationEmailParam.parse_obj({ - "email": obj.get("email") - }) - return _obj - - diff --git a/saasus_sdk_python/models/role.py b/saasus_sdk_python/models/role.py deleted file mode 100644 index 7ee1d8f..0000000 --- a/saasus_sdk_python/models/role.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class Role(BaseModel): - """ - 役割(ロール)情報(role info) - """ - role_name: StrictStr = Field(..., description="役割(ロール)名(role name)") - display_name: StrictStr = Field(..., description="役割(ロール)表示名(role display name)") - __properties = ["role_name", "display_name"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Role: - """Create an instance of Role from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Role: - """Create an instance of Role from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Role.parse_obj(obj) - - _obj = Role.parse_obj({ - "role_name": obj.get("role_name"), - "display_name": obj.get("display_name") - }) - return _obj - - diff --git a/saasus_sdk_python/models/roles.py b/saasus_sdk_python/models/roles.py deleted file mode 100644 index 02d58c1..0000000 --- a/saasus_sdk_python/models/roles.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.role import Role - -class Roles(BaseModel): - """ - Roles - """ - roles: conlist(Role) = Field(...) - __properties = ["roles"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Roles: - """Create an instance of Roles from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in roles (list) - _items = [] - if self.roles: - for _item in self.roles: - if _item: - _items.append(_item.to_dict()) - _dict['roles'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Roles: - """Create an instance of Roles from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Roles.parse_obj(obj) - - _obj = Roles.parse_obj({ - "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/saas_id.py b/saasus_sdk_python/models/saas_id.py deleted file mode 100644 index 32b73ea..0000000 --- a/saasus_sdk_python/models/saas_id.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictInt, StrictStr - -class SaasId(BaseModel): - """ - SaasId - """ - tenant_id: StrictStr = Field(...) - env_id: StrictInt = Field(...) - saas_id: StrictStr = Field(..., description="saas id") - __properties = ["tenant_id", "env_id", "saas_id"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SaasId: - """Create an instance of SaasId from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SaasId: - """Create an instance of SaasId from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SaasId.parse_obj(obj) - - _obj = SaasId.parse_obj({ - "tenant_id": obj.get("tenant_id"), - "env_id": obj.get("env_id"), - "saas_id": obj.get("saas_id") - }) - return _obj - - diff --git a/saasus_sdk_python/models/saas_user.py b/saasus_sdk_python/models/saas_user.py deleted file mode 100644 index 6f7e8f0..0000000 --- a/saasus_sdk_python/models/saas_user.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class SaasUser(BaseModel): - """ - SaasUser - """ - id: StrictStr = Field(...) - email: StrictStr = Field(..., description="メールアドレス(E-mail)") - __properties = ["id", "email"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SaasUser: - """Create an instance of SaasUser from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SaasUser: - """Create an instance of SaasUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SaasUser.parse_obj(obj) - - _obj = SaasUser.parse_obj({ - "id": obj.get("id"), - "email": obj.get("email") - }) - return _obj - - diff --git a/saasus_sdk_python/models/saas_users.py b/saasus_sdk_python/models/saas_users.py deleted file mode 100644 index 6860e64..0000000 --- a/saasus_sdk_python/models/saas_users.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.saas_user import SaasUser - -class SaasUsers(BaseModel): - """ - SaasUsers - """ - users: conlist(SaasUser) = Field(...) - __properties = ["users"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SaasUsers: - """Create an instance of SaasUsers from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in users (list) - _items = [] - if self.users: - for _item in self.users: - if _item: - _items.append(_item.to_dict()) - _dict['users'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SaasUsers: - """Create an instance of SaasUsers from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SaasUsers.parse_obj(obj) - - _obj = SaasUsers.parse_obj({ - "users": [SaasUser.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/self_regist.py b/saasus_sdk_python/models/self_regist.py deleted file mode 100644 index 3042c93..0000000 --- a/saasus_sdk_python/models/self_regist.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictBool - -class SelfRegist(BaseModel): - """ - セルフサインアップを許可設定(self sign-up permission) - """ - enable: StrictBool = Field(...) - __properties = ["enable"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SelfRegist: - """Create an instance of SelfRegist from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SelfRegist: - """Create an instance of SelfRegist from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SelfRegist.parse_obj(obj) - - _obj = SelfRegist.parse_obj({ - "enable": obj.get("enable") - }) - return _obj - - diff --git a/saasus_sdk_python/models/sign_in_settings.py b/saasus_sdk_python/models/sign_in_settings.py deleted file mode 100644 index 41cdc60..0000000 --- a/saasus_sdk_python/models/sign_in_settings.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field -from saasus_sdk_python.models.account_verification import AccountVerification -from saasus_sdk_python.models.device_configuration import DeviceConfiguration -from saasus_sdk_python.models.identity_provider_configuration import IdentityProviderConfiguration -from saasus_sdk_python.models.mfa_configuration import MfaConfiguration -from saasus_sdk_python.models.password_policy import PasswordPolicy -from saasus_sdk_python.models.recaptcha_props import RecaptchaProps -from saasus_sdk_python.models.self_regist import SelfRegist - -class SignInSettings(BaseModel): - """ - SignInSettings - """ - password_policy: PasswordPolicy = Field(...) - device_configuration: DeviceConfiguration = Field(...) - mfa_configuration: MfaConfiguration = Field(...) - recaptcha_props: RecaptchaProps = Field(...) - account_verification: AccountVerification = Field(...) - self_regist: SelfRegist = Field(...) - identity_provider_configuration: IdentityProviderConfiguration = Field(...) - __properties = ["password_policy", "device_configuration", "mfa_configuration", "recaptcha_props", "account_verification", "self_regist", "identity_provider_configuration"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SignInSettings: - """Create an instance of SignInSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of password_policy - if self.password_policy: - _dict['password_policy'] = self.password_policy.to_dict() - # override the default output from pydantic by calling `to_dict()` of device_configuration - if self.device_configuration: - _dict['device_configuration'] = self.device_configuration.to_dict() - # override the default output from pydantic by calling `to_dict()` of mfa_configuration - if self.mfa_configuration: - _dict['mfa_configuration'] = self.mfa_configuration.to_dict() - # override the default output from pydantic by calling `to_dict()` of recaptcha_props - if self.recaptcha_props: - _dict['recaptcha_props'] = self.recaptcha_props.to_dict() - # override the default output from pydantic by calling `to_dict()` of account_verification - if self.account_verification: - _dict['account_verification'] = self.account_verification.to_dict() - # override the default output from pydantic by calling `to_dict()` of self_regist - if self.self_regist: - _dict['self_regist'] = self.self_regist.to_dict() - # override the default output from pydantic by calling `to_dict()` of identity_provider_configuration - if self.identity_provider_configuration: - _dict['identity_provider_configuration'] = self.identity_provider_configuration.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SignInSettings: - """Create an instance of SignInSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SignInSettings.parse_obj(obj) - - _obj = SignInSettings.parse_obj({ - "password_policy": PasswordPolicy.from_dict(obj.get("password_policy")) if obj.get("password_policy") is not None else None, - "device_configuration": DeviceConfiguration.from_dict(obj.get("device_configuration")) if obj.get("device_configuration") is not None else None, - "mfa_configuration": MfaConfiguration.from_dict(obj.get("mfa_configuration")) if obj.get("mfa_configuration") is not None else None, - "recaptcha_props": RecaptchaProps.from_dict(obj.get("recaptcha_props")) if obj.get("recaptcha_props") is not None else None, - "account_verification": AccountVerification.from_dict(obj.get("account_verification")) if obj.get("account_verification") is not None else None, - "self_regist": SelfRegist.from_dict(obj.get("self_regist")) if obj.get("self_regist") is not None else None, - "identity_provider_configuration": IdentityProviderConfiguration.from_dict(obj.get("identity_provider_configuration")) if obj.get("identity_provider_configuration") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/sign_up_param.py b/saasus_sdk_python/models/sign_up_param.py deleted file mode 100644 index fedca4b..0000000 --- a/saasus_sdk_python/models/sign_up_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class SignUpParam(BaseModel): - """ - SignUpParam - """ - email: StrictStr = Field(..., description="メールアドレス(Email Address)") - __properties = ["email"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SignUpParam: - """Create an instance of SignUpParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SignUpParam: - """Create an instance of SignUpParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SignUpParam.parse_obj(obj) - - _obj = SignUpParam.parse_obj({ - "email": obj.get("email") - }) - return _obj - - diff --git a/saasus_sdk_python/models/sign_up_with_aws_marketplace_param.py b/saasus_sdk_python/models/sign_up_with_aws_marketplace_param.py deleted file mode 100644 index 4f0edf3..0000000 --- a/saasus_sdk_python/models/sign_up_with_aws_marketplace_param.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class SignUpWithAwsMarketplaceParam(BaseModel): - """ - SignUpWithAwsMarketplaceParam - """ - email: StrictStr = Field(..., description="メールアドレス(Email Address)") - registration_token: StrictStr = Field(..., description="Registration Token") - __properties = ["email", "registration_token"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SignUpWithAwsMarketplaceParam: - """Create an instance of SignUpWithAwsMarketplaceParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SignUpWithAwsMarketplaceParam: - """Create an instance of SignUpWithAwsMarketplaceParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SignUpWithAwsMarketplaceParam.parse_obj(obj) - - _obj = SignUpWithAwsMarketplaceParam.parse_obj({ - "email": obj.get("email"), - "registration_token": obj.get("registration_token") - }) - return _obj - - diff --git a/saasus_sdk_python/models/software_token_secret_code.py b/saasus_sdk_python/models/software_token_secret_code.py deleted file mode 100644 index c30be3e..0000000 --- a/saasus_sdk_python/models/software_token_secret_code.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class SoftwareTokenSecretCode(BaseModel): - """ - SoftwareTokenSecretCode - """ - secret_code: StrictStr = Field(..., description="シークレットコード(secret code)") - __properties = ["secret_code"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SoftwareTokenSecretCode: - """Create an instance of SoftwareTokenSecretCode from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SoftwareTokenSecretCode: - """Create an instance of SoftwareTokenSecretCode from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SoftwareTokenSecretCode.parse_obj(obj) - - _obj = SoftwareTokenSecretCode.parse_obj({ - "secret_code": obj.get("secret_code") - }) - return _obj - - diff --git a/saasus_sdk_python/models/tenant.py b/saasus_sdk_python/models/tenant.py deleted file mode 100644 index c6403ff..0000000 --- a/saasus_sdk_python/models/tenant.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict, List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist -from saasus_sdk_python.models.billing_info import BillingInfo -from saasus_sdk_python.models.plan_history import PlanHistory - -class Tenant(BaseModel): - """ - Tenant - """ - name: StrictStr = Field(..., description="テナント名(tenant name)") - attributes: Dict[str, Any] = Field(..., description="属性情報(attribute info)") - back_office_staff_email: StrictStr = Field(..., description="事務管理部門スタッフメールアドレス(administrative staff email address)") - next_plan_id: Optional[StrictStr] = None - using_next_plan_from: Optional[StrictInt] = Field(None, description="次回料金プラン開始日時(stripe連携時、当月月初の0時(UTC)を指定すると当月月初開始のサブスクリプションを作成できます。ex. 2023年1月の場合は、1672531200 ) (Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)) ") - next_plan_tax_rate_id: Optional[StrictStr] = None - plan_histories: conlist(PlanHistory) = Field(..., description="料金プラン履歴") - id: StrictStr = Field(...) - plan_id: Optional[StrictStr] = None - billing_info: Optional[BillingInfo] = None - __properties = ["name", "attributes", "back_office_staff_email", "next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "plan_histories", "id", "plan_id", "billing_info"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Tenant: - """Create an instance of Tenant from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) - _items = [] - if self.plan_histories: - for _item in self.plan_histories: - if _item: - _items.append(_item.to_dict()) - _dict['plan_histories'] = _items - # override the default output from pydantic by calling `to_dict()` of billing_info - if self.billing_info: - _dict['billing_info'] = self.billing_info.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Tenant: - """Create an instance of Tenant from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Tenant.parse_obj(obj) - - _obj = Tenant.parse_obj({ - "name": obj.get("name"), - "attributes": obj.get("attributes"), - "back_office_staff_email": obj.get("back_office_staff_email"), - "next_plan_id": obj.get("next_plan_id"), - "using_next_plan_from": obj.get("using_next_plan_from"), - "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), - "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None, - "id": obj.get("id"), - "plan_id": obj.get("plan_id"), - "billing_info": BillingInfo.from_dict(obj.get("billing_info")) if obj.get("billing_info") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/tenant_attributes.py b/saasus_sdk_python/models/tenant_attributes.py deleted file mode 100644 index 333228f..0000000 --- a/saasus_sdk_python/models/tenant_attributes.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.attribute import Attribute - -class TenantAttributes(BaseModel): - """ - TenantAttributes - """ - tenant_attributes: conlist(Attribute) = Field(..., description="テナント属性定義(Tenant Attribute Definition)") - __properties = ["tenant_attributes"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TenantAttributes: - """Create an instance of TenantAttributes from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in tenant_attributes (list) - _items = [] - if self.tenant_attributes: - for _item in self.tenant_attributes: - if _item: - _items.append(_item.to_dict()) - _dict['tenant_attributes'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TenantAttributes: - """Create an instance of TenantAttributes from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TenantAttributes.parse_obj(obj) - - _obj = TenantAttributes.parse_obj({ - "tenant_attributes": [Attribute.from_dict(_item) for _item in obj.get("tenant_attributes")] if obj.get("tenant_attributes") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/tenant_detail.py b/saasus_sdk_python/models/tenant_detail.py deleted file mode 100644 index 1db2fe6..0000000 --- a/saasus_sdk_python/models/tenant_detail.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict, List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist -from saasus_sdk_python.models.billing_info import BillingInfo -from saasus_sdk_python.models.plan_history import PlanHistory - -class TenantDetail(BaseModel): - """ - TenantDetail - """ - id: StrictStr = Field(...) - plan_id: Optional[StrictStr] = None - billing_info: Optional[BillingInfo] = None - name: StrictStr = Field(..., description="テナント名(tenant name)") - attributes: Dict[str, Any] = Field(..., description="属性情報(attribute info)") - back_office_staff_email: StrictStr = Field(..., description="事務管理部門スタッフメールアドレス(administrative staff email address)") - next_plan_id: Optional[StrictStr] = None - using_next_plan_from: Optional[StrictInt] = Field(None, description="次回料金プラン開始日時(stripe連携時、当月月初の0時(UTC)を指定すると当月月初開始のサブスクリプションを作成できます。ex. 2023年1月の場合は、1672531200 ) (Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.)) ") - next_plan_tax_rate_id: Optional[StrictStr] = None - plan_histories: conlist(PlanHistory) = Field(..., description="料金プラン履歴") - current_plan_period_start: Optional[StrictInt] = Field(None, description="現在のプランの開始日時(current plan period start)") - current_plan_period_end: Optional[StrictInt] = Field(None, description="現在のプランの終了日時(current plan period end)") - __properties = ["id", "plan_id", "billing_info", "name", "attributes", "back_office_staff_email", "next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "plan_histories", "current_plan_period_start", "current_plan_period_end"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TenantDetail: - """Create an instance of TenantDetail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of billing_info - if self.billing_info: - _dict['billing_info'] = self.billing_info.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) - _items = [] - if self.plan_histories: - for _item in self.plan_histories: - if _item: - _items.append(_item.to_dict()) - _dict['plan_histories'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TenantDetail: - """Create an instance of TenantDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TenantDetail.parse_obj(obj) - - _obj = TenantDetail.parse_obj({ - "id": obj.get("id"), - "plan_id": obj.get("plan_id"), - "billing_info": BillingInfo.from_dict(obj.get("billing_info")) if obj.get("billing_info") is not None else None, - "name": obj.get("name"), - "attributes": obj.get("attributes"), - "back_office_staff_email": obj.get("back_office_staff_email"), - "next_plan_id": obj.get("next_plan_id"), - "using_next_plan_from": obj.get("using_next_plan_from"), - "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), - "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None, - "current_plan_period_start": obj.get("current_plan_period_start"), - "current_plan_period_end": obj.get("current_plan_period_end") - }) - return _obj - - diff --git a/saasus_sdk_python/models/tenant_props.py b/saasus_sdk_python/models/tenant_props.py deleted file mode 100644 index 9f9ffc2..0000000 --- a/saasus_sdk_python/models/tenant_props.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict -from pydantic import BaseModel, Field, StrictStr - -class TenantProps(BaseModel): - """ - TenantProps - """ - name: StrictStr = Field(..., description="テナント名(tenant name)") - attributes: Dict[str, Any] = Field(..., description="属性情報(attribute info)") - back_office_staff_email: StrictStr = Field(..., description="事務管理部門スタッフメールアドレス(administrative staff email address)") - __properties = ["name", "attributes", "back_office_staff_email"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> TenantProps: - """Create an instance of TenantProps from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> TenantProps: - """Create an instance of TenantProps from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return TenantProps.parse_obj(obj) - - _obj = TenantProps.parse_obj({ - "name": obj.get("name"), - "attributes": obj.get("attributes"), - "back_office_staff_email": obj.get("back_office_staff_email") - }) - return _obj - - diff --git a/saasus_sdk_python/models/tenants.py b/saasus_sdk_python/models/tenants.py deleted file mode 100644 index 9b3cbc5..0000000 --- a/saasus_sdk_python/models/tenants.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.tenant import Tenant - -class Tenants(BaseModel): - """ - テナント情報(Tenant Info) - """ - tenants: conlist(Tenant) = Field(...) - __properties = ["tenants"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Tenants: - """Create an instance of Tenants from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) - _items = [] - if self.tenants: - for _item in self.tenants: - if _item: - _items.append(_item.to_dict()) - _dict['tenants'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Tenants: - """Create an instance of Tenants from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Tenants.parse_obj(obj) - - _obj = Tenants.parse_obj({ - "tenants": [Tenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_basic_info_param.py b/saasus_sdk_python/models/update_basic_info_param.py deleted file mode 100644 index 01d9b42..0000000 --- a/saasus_sdk_python/models/update_basic_info_param.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class UpdateBasicInfoParam(BaseModel): - """ - UpdateBasicInfoParam - """ - domain_name: StrictStr = Field(..., description="ドメイン名(Domain Name)") - from_email_address: StrictStr = Field(..., description="認証メールの送信元メールアドレス(Sender email of authentication email)") - reply_email_address: Optional[StrictStr] = Field(None, description="認証メールの返信元メールアドレス(Reply-from email address of authentication email)") - __properties = ["domain_name", "from_email_address", "reply_email_address"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateBasicInfoParam: - """Create an instance of UpdateBasicInfoParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateBasicInfoParam: - """Create an instance of UpdateBasicInfoParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateBasicInfoParam.parse_obj(obj) - - _obj = UpdateBasicInfoParam.parse_obj({ - "domain_name": obj.get("domain_name"), - "from_email_address": obj.get("from_email_address"), - "reply_email_address": obj.get("reply_email_address") - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_customize_page_settings_param.py b/saasus_sdk_python/models/update_customize_page_settings_param.py deleted file mode 100644 index 5b27ec5..0000000 --- a/saasus_sdk_python/models/update_customize_page_settings_param.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class UpdateCustomizePageSettingsParam(BaseModel): - """ - UpdateCustomizePageSettingsParam - """ - title: StrictStr = Field(..., description="サービス名(service name)") - terms_of_service_url: StrictStr = Field(..., description="利用規約URL(terms of service URL)") - privacy_policy_url: StrictStr = Field(..., description="プライバシーポリシーURL(privacy policy URL)") - google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager コンテナ ID(Google Tag Manager container ID)") - icon: StrictStr = Field(..., description="サービスアイコン(service icon)") - favicon: StrictStr = Field(..., description="ファビコン(favicon)") - __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id", "icon", "favicon"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateCustomizePageSettingsParam: - """Create an instance of UpdateCustomizePageSettingsParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateCustomizePageSettingsParam: - """Create an instance of UpdateCustomizePageSettingsParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateCustomizePageSettingsParam.parse_obj(obj) - - _obj = UpdateCustomizePageSettingsParam.parse_obj({ - "title": obj.get("title"), - "terms_of_service_url": obj.get("terms_of_service_url"), - "privacy_policy_url": obj.get("privacy_policy_url"), - "google_tag_manager_container_id": obj.get("google_tag_manager_container_id"), - "icon": obj.get("icon"), - "favicon": obj.get("favicon") - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_customize_pages_param.py b/saasus_sdk_python/models/update_customize_pages_param.py deleted file mode 100644 index 320288a..0000000 --- a/saasus_sdk_python/models/update_customize_pages_param.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel -from saasus_sdk_python.models.customize_page_props import CustomizePageProps - -class UpdateCustomizePagesParam(BaseModel): - """ - UpdateCustomizePagesParam - """ - sign_up_page: Optional[CustomizePageProps] = None - sign_in_page: Optional[CustomizePageProps] = None - password_reset_page: Optional[CustomizePageProps] = None - __properties = ["sign_up_page", "sign_in_page", "password_reset_page"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateCustomizePagesParam: - """Create an instance of UpdateCustomizePagesParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of sign_up_page - if self.sign_up_page: - _dict['sign_up_page'] = self.sign_up_page.to_dict() - # override the default output from pydantic by calling `to_dict()` of sign_in_page - if self.sign_in_page: - _dict['sign_in_page'] = self.sign_in_page.to_dict() - # override the default output from pydantic by calling `to_dict()` of password_reset_page - if self.password_reset_page: - _dict['password_reset_page'] = self.password_reset_page.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateCustomizePagesParam: - """Create an instance of UpdateCustomizePagesParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateCustomizePagesParam.parse_obj(obj) - - _obj = UpdateCustomizePagesParam.parse_obj({ - "sign_up_page": CustomizePageProps.from_dict(obj.get("sign_up_page")) if obj.get("sign_up_page") is not None else None, - "sign_in_page": CustomizePageProps.from_dict(obj.get("sign_in_page")) if obj.get("sign_in_page") is not None else None, - "password_reset_page": CustomizePageProps.from_dict(obj.get("password_reset_page")) if obj.get("password_reset_page") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_env_param.py b/saasus_sdk_python/models/update_env_param.py deleted file mode 100644 index 1045272..0000000 --- a/saasus_sdk_python/models/update_env_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class UpdateEnvParam(BaseModel): - """ - UpdateEnvParam - """ - name: StrictStr = Field(..., description="環境名(env name)") - __properties = ["name"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateEnvParam: - """Create an instance of UpdateEnvParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateEnvParam: - """Create an instance of UpdateEnvParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateEnvParam.parse_obj(obj) - - _obj = UpdateEnvParam.parse_obj({ - "name": obj.get("name") - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_identity_provider_param.py b/saasus_sdk_python/models/update_identity_provider_param.py deleted file mode 100644 index 0eee4fa..0000000 --- a/saasus_sdk_python/models/update_identity_provider_param.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel, Field -from saasus_sdk_python.models.identity_provider_props import IdentityProviderProps -from saasus_sdk_python.models.provider_name import ProviderName - -class UpdateIdentityProviderParam(BaseModel): - """ - UpdateIdentityProviderParam - """ - provider: ProviderName = Field(...) - identity_provider_props: Optional[IdentityProviderProps] = None - __properties = ["provider", "identity_provider_props"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateIdentityProviderParam: - """Create an instance of UpdateIdentityProviderParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of identity_provider_props - if self.identity_provider_props: - _dict['identity_provider_props'] = self.identity_provider_props.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateIdentityProviderParam: - """Create an instance of UpdateIdentityProviderParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateIdentityProviderParam.parse_obj(obj) - - _obj = UpdateIdentityProviderParam.parse_obj({ - "provider": obj.get("provider"), - "identity_provider_props": IdentityProviderProps.from_dict(obj.get("identity_provider_props")) if obj.get("identity_provider_props") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_notification_messages_param.py b/saasus_sdk_python/models/update_notification_messages_param.py deleted file mode 100644 index 092642e..0000000 --- a/saasus_sdk_python/models/update_notification_messages_param.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel -from saasus_sdk_python.models.message_template import MessageTemplate - -class UpdateNotificationMessagesParam(BaseModel): - """ - UpdateNotificationMessagesParam - """ - sign_up: Optional[MessageTemplate] = None - create_user: Optional[MessageTemplate] = None - resend_code: Optional[MessageTemplate] = None - forgot_password: Optional[MessageTemplate] = None - update_user_attribute: Optional[MessageTemplate] = None - verify_user_attribute: Optional[MessageTemplate] = None - authentication_mfa: Optional[MessageTemplate] = None - __properties = ["sign_up", "create_user", "resend_code", "forgot_password", "update_user_attribute", "verify_user_attribute", "authentication_mfa"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateNotificationMessagesParam: - """Create an instance of UpdateNotificationMessagesParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of sign_up - if self.sign_up: - _dict['sign_up'] = self.sign_up.to_dict() - # override the default output from pydantic by calling `to_dict()` of create_user - if self.create_user: - _dict['create_user'] = self.create_user.to_dict() - # override the default output from pydantic by calling `to_dict()` of resend_code - if self.resend_code: - _dict['resend_code'] = self.resend_code.to_dict() - # override the default output from pydantic by calling `to_dict()` of forgot_password - if self.forgot_password: - _dict['forgot_password'] = self.forgot_password.to_dict() - # override the default output from pydantic by calling `to_dict()` of update_user_attribute - if self.update_user_attribute: - _dict['update_user_attribute'] = self.update_user_attribute.to_dict() - # override the default output from pydantic by calling `to_dict()` of verify_user_attribute - if self.verify_user_attribute: - _dict['verify_user_attribute'] = self.verify_user_attribute.to_dict() - # override the default output from pydantic by calling `to_dict()` of authentication_mfa - if self.authentication_mfa: - _dict['authentication_mfa'] = self.authentication_mfa.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateNotificationMessagesParam: - """Create an instance of UpdateNotificationMessagesParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateNotificationMessagesParam.parse_obj(obj) - - _obj = UpdateNotificationMessagesParam.parse_obj({ - "sign_up": MessageTemplate.from_dict(obj.get("sign_up")) if obj.get("sign_up") is not None else None, - "create_user": MessageTemplate.from_dict(obj.get("create_user")) if obj.get("create_user") is not None else None, - "resend_code": MessageTemplate.from_dict(obj.get("resend_code")) if obj.get("resend_code") is not None else None, - "forgot_password": MessageTemplate.from_dict(obj.get("forgot_password")) if obj.get("forgot_password") is not None else None, - "update_user_attribute": MessageTemplate.from_dict(obj.get("update_user_attribute")) if obj.get("update_user_attribute") is not None else None, - "verify_user_attribute": MessageTemplate.from_dict(obj.get("verify_user_attribute")) if obj.get("verify_user_attribute") is not None else None, - "authentication_mfa": MessageTemplate.from_dict(obj.get("authentication_mfa")) if obj.get("authentication_mfa") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_saas_user_email_param.py b/saasus_sdk_python/models/update_saas_user_email_param.py deleted file mode 100644 index 56bbe73..0000000 --- a/saasus_sdk_python/models/update_saas_user_email_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class UpdateSaasUserEmailParam(BaseModel): - """ - UpdateSaasUserEmailParam - """ - email: StrictStr = Field(..., description="メールアドレス(e-mail)") - __properties = ["email"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateSaasUserEmailParam: - """Create an instance of UpdateSaasUserEmailParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateSaasUserEmailParam: - """Create an instance of UpdateSaasUserEmailParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateSaasUserEmailParam.parse_obj(obj) - - _obj = UpdateSaasUserEmailParam.parse_obj({ - "email": obj.get("email") - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_saas_user_password_param.py b/saasus_sdk_python/models/update_saas_user_password_param.py deleted file mode 100644 index 75b877d..0000000 --- a/saasus_sdk_python/models/update_saas_user_password_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class UpdateSaasUserPasswordParam(BaseModel): - """ - UpdateSaasUserPasswordParam - """ - password: StrictStr = Field(..., description="パスワード(password)") - __properties = ["password"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateSaasUserPasswordParam: - """Create an instance of UpdateSaasUserPasswordParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateSaasUserPasswordParam: - """Create an instance of UpdateSaasUserPasswordParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateSaasUserPasswordParam.parse_obj(obj) - - _obj = UpdateSaasUserPasswordParam.parse_obj({ - "password": obj.get("password") - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_sign_in_settings_param.py b/saasus_sdk_python/models/update_sign_in_settings_param.py deleted file mode 100644 index 1e102d0..0000000 --- a/saasus_sdk_python/models/update_sign_in_settings_param.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Optional -from pydantic import BaseModel -from saasus_sdk_python.models.account_verification import AccountVerification -from saasus_sdk_python.models.device_configuration import DeviceConfiguration -from saasus_sdk_python.models.mfa_configuration import MfaConfiguration -from saasus_sdk_python.models.password_policy import PasswordPolicy -from saasus_sdk_python.models.recaptcha_props import RecaptchaProps -from saasus_sdk_python.models.self_regist import SelfRegist - -class UpdateSignInSettingsParam(BaseModel): - """ - UpdateSignInSettingsParam - """ - password_policy: Optional[PasswordPolicy] = None - device_configuration: Optional[DeviceConfiguration] = None - mfa_configuration: Optional[MfaConfiguration] = None - recaptcha_props: Optional[RecaptchaProps] = None - account_verification: Optional[AccountVerification] = None - self_regist: Optional[SelfRegist] = None - __properties = ["password_policy", "device_configuration", "mfa_configuration", "recaptcha_props", "account_verification", "self_regist"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateSignInSettingsParam: - """Create an instance of UpdateSignInSettingsParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of password_policy - if self.password_policy: - _dict['password_policy'] = self.password_policy.to_dict() - # override the default output from pydantic by calling `to_dict()` of device_configuration - if self.device_configuration: - _dict['device_configuration'] = self.device_configuration.to_dict() - # override the default output from pydantic by calling `to_dict()` of mfa_configuration - if self.mfa_configuration: - _dict['mfa_configuration'] = self.mfa_configuration.to_dict() - # override the default output from pydantic by calling `to_dict()` of recaptcha_props - if self.recaptcha_props: - _dict['recaptcha_props'] = self.recaptcha_props.to_dict() - # override the default output from pydantic by calling `to_dict()` of account_verification - if self.account_verification: - _dict['account_verification'] = self.account_verification.to_dict() - # override the default output from pydantic by calling `to_dict()` of self_regist - if self.self_regist: - _dict['self_regist'] = self.self_regist.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateSignInSettingsParam: - """Create an instance of UpdateSignInSettingsParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateSignInSettingsParam.parse_obj(obj) - - _obj = UpdateSignInSettingsParam.parse_obj({ - "password_policy": PasswordPolicy.from_dict(obj.get("password_policy")) if obj.get("password_policy") is not None else None, - "device_configuration": DeviceConfiguration.from_dict(obj.get("device_configuration")) if obj.get("device_configuration") is not None else None, - "mfa_configuration": MfaConfiguration.from_dict(obj.get("mfa_configuration")) if obj.get("mfa_configuration") is not None else None, - "recaptcha_props": RecaptchaProps.from_dict(obj.get("recaptcha_props")) if obj.get("recaptcha_props") is not None else None, - "account_verification": AccountVerification.from_dict(obj.get("account_verification")) if obj.get("account_verification") is not None else None, - "self_regist": SelfRegist.from_dict(obj.get("self_regist")) if obj.get("self_regist") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_software_token_param.py b/saasus_sdk_python/models/update_software_token_param.py deleted file mode 100644 index 32e3ac7..0000000 --- a/saasus_sdk_python/models/update_software_token_param.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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, Field, StrictStr - -class UpdateSoftwareTokenParam(BaseModel): - """ - UpdateSoftwareTokenParam - """ - access_token: StrictStr = Field(..., description="アクセストークン(access token)") - verification_code: StrictStr = Field(..., description="検証コード(verification code)") - __properties = ["access_token", "verification_code"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateSoftwareTokenParam: - """Create an instance of UpdateSoftwareTokenParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateSoftwareTokenParam: - """Create an instance of UpdateSoftwareTokenParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateSoftwareTokenParam.parse_obj(obj) - - _obj = UpdateSoftwareTokenParam.parse_obj({ - "access_token": obj.get("access_token"), - "verification_code": obj.get("verification_code") - }) - return _obj - - diff --git a/saasus_sdk_python/models/update_tenant_user_param.py b/saasus_sdk_python/models/update_tenant_user_param.py deleted file mode 100644 index b60427c..0000000 --- a/saasus_sdk_python/models/update_tenant_user_param.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict -from pydantic import BaseModel, Field - -class UpdateTenantUserParam(BaseModel): - """ - UpdateTenantUserParam - """ - attributes: Dict[str, Any] = Field(..., description="属性情報(SaaS 開発コンソールでユーザー属性定義を行い設定された情報を取得します) Attribute information (Get information set by defining user attributes in the SaaS development console) ") - __properties = ["attributes"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UpdateTenantUserParam: - """Create an instance of UpdateTenantUserParam from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UpdateTenantUserParam: - """Create an instance of UpdateTenantUserParam from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UpdateTenantUserParam.parse_obj(obj) - - _obj = UpdateTenantUserParam.parse_obj({ - "attributes": obj.get("attributes") - }) - return _obj - - diff --git a/saasus_sdk_python/models/user.py b/saasus_sdk_python/models/user.py deleted file mode 100644 index 2aaae6d..0000000 --- a/saasus_sdk_python/models/user.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict, List -from pydantic import BaseModel, Field, StrictStr, conlist -from saasus_sdk_python.models.user_available_env import UserAvailableEnv - -class User(BaseModel): - """ - User - """ - id: StrictStr = Field(..., description="ユーザーID(User ID)") - tenant_id: StrictStr = Field(...) - tenant_name: StrictStr = Field(..., description="テナント名(Tenant Name)") - email: StrictStr = Field(..., description="メールアドレス(E-mail)") - attributes: Dict[str, Any] = Field(..., description="属性情報(SaaS 開発コンソールでユーザー属性定義を行い設定された情報を取得します) Attribute information (Get information set by defining user attributes in the SaaS development console) ") - envs: conlist(UserAvailableEnv) = Field(...) - __properties = ["id", "tenant_id", "tenant_name", "email", "attributes", "envs"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> User: - """Create an instance of User from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in envs (list) - _items = [] - if self.envs: - for _item in self.envs: - if _item: - _items.append(_item.to_dict()) - _dict['envs'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> User: - """Create an instance of User from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return User.parse_obj(obj) - - _obj = User.parse_obj({ - "id": obj.get("id"), - "tenant_id": obj.get("tenant_id"), - "tenant_name": obj.get("tenant_name"), - "email": obj.get("email"), - "attributes": obj.get("attributes"), - "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/user_attributes.py b/saasus_sdk_python/models/user_attributes.py deleted file mode 100644 index 212054c..0000000 --- a/saasus_sdk_python/models/user_attributes.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.attribute import Attribute - -class UserAttributes(BaseModel): - """ - UserAttributes - """ - user_attributes: conlist(Attribute) = Field(..., description="ユーザー属性定義(User attribute definition)") - __properties = ["user_attributes"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UserAttributes: - """Create an instance of UserAttributes from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in user_attributes (list) - _items = [] - if self.user_attributes: - for _item in self.user_attributes: - if _item: - _items.append(_item.to_dict()) - _dict['user_attributes'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UserAttributes: - """Create an instance of UserAttributes from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UserAttributes.parse_obj(obj) - - _obj = UserAttributes.parse_obj({ - "user_attributes": [Attribute.from_dict(_item) for _item in obj.get("user_attributes")] if obj.get("user_attributes") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/user_available_env.py b/saasus_sdk_python/models/user_available_env.py deleted file mode 100644 index 429390d..0000000 --- a/saasus_sdk_python/models/user_available_env.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist -from saasus_sdk_python.models.role import Role - -class UserAvailableEnv(BaseModel): - """ - UserAvailableEnv - """ - id: StrictInt = Field(...) - name: StrictStr = Field(..., description="環境名(env name)") - roles: conlist(Role) = Field(..., description="役割(ロール)情報(role info)") - __properties = ["id", "name", "roles"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UserAvailableEnv: - """Create an instance of UserAvailableEnv from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in roles (list) - _items = [] - if self.roles: - for _item in self.roles: - if _item: - _items.append(_item.to_dict()) - _dict['roles'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UserAvailableEnv: - """Create an instance of UserAvailableEnv from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UserAvailableEnv.parse_obj(obj) - - _obj = UserAvailableEnv.parse_obj({ - "id": obj.get("id"), - "name": obj.get("name"), - "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/user_available_tenant.py b/saasus_sdk_python/models/user_available_tenant.py deleted file mode 100644 index a1054c2..0000000 --- a/saasus_sdk_python/models/user_available_tenant.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import Any, Dict, List, Optional -from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist -from saasus_sdk_python.models.user_available_env import UserAvailableEnv - -class UserAvailableTenant(BaseModel): - """ - UserAvailableTenant - """ - id: StrictStr = Field(...) - name: StrictStr = Field(..., description="テナント名(tenant name)") - completed_sign_up: StrictBool = Field(...) - envs: conlist(UserAvailableEnv) = Field(..., description="環境情報、役割(ロール)情報(environmental info, role info)") - user_attribute: Dict[str, Any] = Field(..., description="ユーザー追加属性(user additional attributes)") - back_office_staff_email: StrictStr = Field(..., description="バックオフィス担当者のメール(back office contact email)") - plan_id: Optional[StrictStr] = None - is_paid: Optional[StrictBool] = Field(None, description="テナントの支払い状況(tenant payment status) ※ 現在はストライプ連携時のみ返却されます。Currently, it is returned only when stripe is linked. ") - __properties = ["id", "name", "completed_sign_up", "envs", "user_attribute", "back_office_staff_email", "plan_id", "is_paid"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UserAvailableTenant: - """Create an instance of UserAvailableTenant from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in envs (list) - _items = [] - if self.envs: - for _item in self.envs: - if _item: - _items.append(_item.to_dict()) - _dict['envs'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UserAvailableTenant: - """Create an instance of UserAvailableTenant from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UserAvailableTenant.parse_obj(obj) - - _obj = UserAvailableTenant.parse_obj({ - "id": obj.get("id"), - "name": obj.get("name"), - "completed_sign_up": obj.get("completed_sign_up"), - "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None, - "user_attribute": obj.get("user_attribute"), - "back_office_staff_email": obj.get("back_office_staff_email"), - "plan_id": obj.get("plan_id"), - "is_paid": obj.get("is_paid") - }) - return _obj - - diff --git a/saasus_sdk_python/models/user_info.py b/saasus_sdk_python/models/user_info.py deleted file mode 100644 index 3288388..0000000 --- a/saasus_sdk_python/models/user_info.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, StrictStr, conlist -from saasus_sdk_python.models.user_available_tenant import UserAvailableTenant - -class UserInfo(BaseModel): - """ - UserInfo - """ - id: StrictStr = Field(...) - email: StrictStr = Field(..., description="メールアドレス(E-mail)") - tenants: conlist(UserAvailableTenant) = Field(..., description="テナント情報(Tenant Info)") - __properties = ["id", "email", "tenants"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UserInfo: - """Create an instance of UserInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) - _items = [] - if self.tenants: - for _item in self.tenants: - if _item: - _items.append(_item.to_dict()) - _dict['tenants'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UserInfo: - """Create an instance of UserInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UserInfo.parse_obj(obj) - - _obj = UserInfo.parse_obj({ - "id": obj.get("id"), - "email": obj.get("email"), - "tenants": [UserAvailableTenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/models/users.py b/saasus_sdk_python/models/users.py deleted file mode 100644 index 262e7fb..0000000 --- a/saasus_sdk_python/models/users.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - 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 typing import List -from pydantic import BaseModel, Field, conlist -from saasus_sdk_python.models.user import User - -class Users(BaseModel): - """ - Users - """ - users: conlist(User) = Field(...) - __properties = ["users"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Users: - """Create an instance of Users from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in users (list) - _items = [] - if self.users: - for _item in self.users: - if _item: - _items.append(_item.to_dict()) - _dict['users'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Users: - """Create an instance of Users from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Users.parse_obj(obj) - - _obj = Users.parse_obj({ - "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None - }) - return _obj - - diff --git a/saasus_sdk_python/rest.py b/saasus_sdk_python/rest.py deleted file mode 100644 index 9164596..0000000 --- a/saasus_sdk_python/rest.py +++ /dev/null @@ -1,303 +0,0 @@ -# coding: utf-8 - -""" - SaaSus Auth API Schema - - スキーマ - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import logging -import re -import ssl - -from urllib.parse import urlencode, quote_plus -import urllib3 - -from saasus_sdk_python.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.headers.get(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :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 - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - # url already contains the URL query string - # so reset query_params to empty dict - query_params = {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields={}, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 400: - raise BadRequestException(http_resp=r) - - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def get_request(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def head_request(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def options_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def delete_request(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def post_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def put_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def patch_request(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) diff --git a/saasus_sdk_python/src/apilog/__init__.py b/saasus_sdk_python/src/apilog/__init__.py new file mode 100644 index 0000000..4d79a1e --- /dev/null +++ b/saasus_sdk_python/src/apilog/__init__.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.apilog.api.api_log_api import ApiLogApi +from saasus_sdk_python.src.apilog.api.error_api import ErrorApi + +# import ApiClient +from saasus_sdk_python.src.apilog.api_response import ApiResponse +from saasus_sdk_python.src.apilog.api_client import ApiClient +from saasus_sdk_python.src.apilog.configuration import Configuration +from saasus_sdk_python.src.apilog.exceptions import OpenApiException +from saasus_sdk_python.src.apilog.exceptions import ApiTypeError +from saasus_sdk_python.src.apilog.exceptions import ApiValueError +from saasus_sdk_python.src.apilog.exceptions import ApiKeyError +from saasus_sdk_python.src.apilog.exceptions import ApiAttributeError +from saasus_sdk_python.src.apilog.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.models.error import Error diff --git a/saasus_sdk_python/src/apilog/api/__init__.py b/saasus_sdk_python/src/apilog/api/__init__.py new file mode 100644 index 0000000..956683c --- /dev/null +++ b/saasus_sdk_python/src/apilog/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.apilog.api.api_log_api import ApiLogApi +from saasus_sdk_python.src.apilog.api.error_api import ErrorApi + diff --git a/saasus_sdk_python/src/apilog/api/api_log_api.py b/saasus_sdk_python/src/apilog/api/api_log_api.py new file mode 100644 index 0000000..64a0251 --- /dev/null +++ b/saasus_sdk_python/src/apilog/api/api_log_api.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from datetime import date, datetime + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +from saasus_sdk_python.src.apilog.api_client import ApiClient +from saasus_sdk_python.src.apilog.api_response import ApiResponse +from saasus_sdk_python.src.apilog.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ApiLogApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_log(self, api_log_id : Annotated[StrictStr, Field(..., description="API Log ID")], **kwargs) -> ApiLog: # noqa: E501 + """Get API execution log # noqa: E501 + + Retrieve the log of the API execution with the specified ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_log(api_log_id, async_req=True) + >>> result = thread.get() + + :param api_log_id: API Log ID (required) + :type api_log_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ApiLog + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_log_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_log_with_http_info(api_log_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_log_with_http_info(self, api_log_id : Annotated[StrictStr, Field(..., description="API Log ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get API execution log # noqa: E501 + + Retrieve the log of the API execution with the specified ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_log_with_http_info(api_log_id, async_req=True) + >>> result = thread.get() + + :param api_log_id: API Log ID (required) + :type api_log_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiLog, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'api_log_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_log" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['api_log_id']: + _path_params['api_log_id'] = _params['api_log_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "ApiLog", + '500': "Error", + } + + return self.api_client.call_api( + '/logs/{api_log_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_logs(self, created_date : Annotated[Optional[date], Field(description="The date, in format of YYYY-MM-DD, to retrieve the log.")] = None, created_at : Annotated[Optional[datetime], Field(description="The datetime, in ISO 8601 format, to retrieve the log.")] = None, limit : Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Maximum number of logs to retrieve.")] = None, cursor : Annotated[Optional[StrictStr], Field(description="Cursor for cursor pagination.")] = None, **kwargs) -> ApiLogs: # noqa: E501 + """Get API execution log list # noqa: E501 + + Retrieve the log of all API executions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_logs(created_date, created_at, limit, cursor, async_req=True) + >>> result = thread.get() + + :param created_date: The date, in format of YYYY-MM-DD, to retrieve the log. + :type created_date: date + :param created_at: The datetime, in ISO 8601 format, to retrieve the log. + :type created_at: datetime + :param limit: Maximum number of logs to retrieve. + :type limit: int + :param cursor: Cursor for cursor pagination. + :type cursor: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ApiLogs + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_logs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_logs_with_http_info(created_date, created_at, limit, cursor, **kwargs) # noqa: E501 + + @validate_arguments + def get_logs_with_http_info(self, created_date : Annotated[Optional[date], Field(description="The date, in format of YYYY-MM-DD, to retrieve the log.")] = None, created_at : Annotated[Optional[datetime], Field(description="The datetime, in ISO 8601 format, to retrieve the log.")] = None, limit : Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Maximum number of logs to retrieve.")] = None, cursor : Annotated[Optional[StrictStr], Field(description="Cursor for cursor pagination.")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get API execution log list # noqa: E501 + + Retrieve the log of all API executions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_logs_with_http_info(created_date, created_at, limit, cursor, async_req=True) + >>> result = thread.get() + + :param created_date: The date, in format of YYYY-MM-DD, to retrieve the log. + :type created_date: date + :param created_at: The datetime, in ISO 8601 format, to retrieve the log. + :type created_at: datetime + :param limit: Maximum number of logs to retrieve. + :type limit: int + :param cursor: Cursor for cursor pagination. + :type cursor: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiLogs, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'created_date', + 'created_at', + 'limit', + 'cursor' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_logs" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('created_date') is not None: # noqa: E501 + if isinstance(_params['created_date'], date): + _query_params.append(('created_date', _params['created_date'].strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(('created_date', _params['created_date'])) + + if _params.get('created_at') is not None: # noqa: E501 + if isinstance(_params['created_at'], datetime): + _query_params.append(('created_at', _params['created_at'].strftime(self.api_client.configuration.datetime_format))) + else: + _query_params.append(('created_at', _params['created_at'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('cursor') is not None: # noqa: E501 + _query_params.append(('cursor', _params['cursor'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "ApiLogs", + '500': "Error", + } + + return self.api_client.call_api( + '/logs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/apilog/api/error_api.py b/saasus_sdk_python/src/apilog/api/error_api.py new file mode 100644 index 0000000..8a3d504 --- /dev/null +++ b/saasus_sdk_python/src/apilog/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.apilog.api_client import ApiClient +from saasus_sdk_python.src.apilog.api_response import ApiResponse +from saasus_sdk_python.src.apilog.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Returns a server error with status code 500 # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Returns a server error with status code 500 # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/apilog/api_client.py b/saasus_sdk_python/src/apilog/api_client.py new file mode 100644 index 0000000..2c8fcd2 --- /dev/null +++ b/saasus_sdk_python/src/apilog/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.apilog.configuration import Configuration +from saasus_sdk_python.src.apilog.api_response import ApiResponse +import saasus_sdk_python.src.apilog.models +from saasus_sdk_python.src.apilog import rest +from saasus_sdk_python.src.apilog.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.apilog.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/api_response.py b/saasus_sdk_python/src/apilog/api_response.py similarity index 100% rename from saasus_sdk_python/api_response.py rename to saasus_sdk_python/src/apilog/api_response.py diff --git a/saasus_sdk_python/src/apilog/configuration.py b/saasus_sdk_python/src/apilog/configuration.py new file mode 100644 index 0000000..bb06bab --- /dev/null +++ b/saasus_sdk_python/src/apilog/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.apilog.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/apilog" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.apilog") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/apilog", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/apilog/exceptions.py b/saasus_sdk_python/src/apilog/exceptions.py new file mode 100644 index 0000000..5ea3592 --- /dev/null +++ b/saasus_sdk_python/src/apilog/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/apilog/models/__init__.py b/saasus_sdk_python/src/apilog/models/__init__.py new file mode 100644 index 0000000..3379fbb --- /dev/null +++ b/saasus_sdk_python/src/apilog/models/__init__.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.models.error import Error diff --git a/saasus_sdk_python/src/apilog/models/api_log.py b/saasus_sdk_python/src/apilog/models/api_log.py new file mode 100644 index 0000000..a72cd00 --- /dev/null +++ b/saasus_sdk_python/src/apilog/models/api_log.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class ApiLog(BaseModel): + """ + ApiLog + """ + trace_id: StrictStr = Field(..., description="Trace ID") + api_log_id: StrictStr = Field(...) + created_at: StrictInt = Field(..., description="Epoch second of API log registration timestamp") + created_date: StrictStr = Field(..., description="API log registration date") + ttl: StrictInt = Field(..., description="Epoch second of planned API log deletion") + request_method: StrictStr = Field(..., description="Request method") + saas_id: StrictStr = Field(...) + api_key: StrictStr = Field(..., description="API Key") + response_status: StrictStr = Field(..., description="Response status") + request_uri: StrictStr = Field(..., description="Request URI") + remote_address: StrictStr = Field(..., description="Client IP Address") + referer: StrictStr = Field(..., description="The referrer of the request") + request_body: StrictStr = Field(..., description="The body of the request") + response_body: StrictStr = Field(..., description="The body of the response") + __properties = ["trace_id", "api_log_id", "created_at", "created_date", "ttl", "request_method", "saas_id", "api_key", "response_status", "request_uri", "remote_address", "referer", "request_body", "response_body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ApiLog: + """Create an instance of ApiLog from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiLog: + """Create an instance of ApiLog from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ApiLog.parse_obj(obj) + + _obj = ApiLog.parse_obj({ + "trace_id": obj.get("trace_id"), + "api_log_id": obj.get("api_log_id"), + "created_at": obj.get("created_at"), + "created_date": obj.get("created_date"), + "ttl": obj.get("ttl"), + "request_method": obj.get("request_method"), + "saas_id": obj.get("saas_id"), + "api_key": obj.get("api_key"), + "response_status": obj.get("response_status"), + "request_uri": obj.get("request_uri"), + "remote_address": obj.get("remote_address"), + "referer": obj.get("referer"), + "request_body": obj.get("request_body"), + "response_body": obj.get("response_body") + }) + return _obj + + diff --git a/saasus_sdk_python/src/apilog/models/api_logs.py b/saasus_sdk_python/src/apilog/models/api_logs.py new file mode 100644 index 0000000..02565e7 --- /dev/null +++ b/saasus_sdk_python/src/apilog/models/api_logs.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from typing_extensions import Annotated + +class ApiLogs(BaseModel): + """ + ApiLogs + """ + api_logs: Annotated[List[ApiLog], Field()] = Field(...) + cursor: Optional[StrictStr] = Field(None, description="Cursor for cursor pagination") + __properties = ["api_logs", "cursor"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ApiLogs: + """Create an instance of ApiLogs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in api_logs (list) + _items = [] + if self.api_logs: + for _item in self.api_logs: + if _item: + _items.append(_item.to_dict()) + _dict['api_logs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiLogs: + """Create an instance of ApiLogs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ApiLogs.parse_obj(obj) + + _obj = ApiLogs.parse_obj({ + "api_logs": [ApiLog.from_dict(_item) for _item in obj.get("api_logs")] if obj.get("api_logs") is not None else None, + "cursor": obj.get("cursor") + }) + return _obj + + diff --git a/saasus_sdk_python/src/apilog/models/error.py b/saasus_sdk_python/src/apilog/models/error.py new file mode 100644 index 0000000..aa51270 --- /dev/null +++ b/saasus_sdk_python/src/apilog/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/py.typed b/saasus_sdk_python/src/apilog/py.typed similarity index 100% rename from saasus_sdk_python/py.typed rename to saasus_sdk_python/src/apilog/py.typed diff --git a/saasus_sdk_python/src/apilog/rest.py b/saasus_sdk_python/src/apilog/rest.py new file mode 100644 index 0000000..f9fcf22 --- /dev/null +++ b/saasus_sdk_python/src/apilog/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.apilog.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/saasus_sdk_python/src/auth/__init__.py b/saasus_sdk_python/src/auth/__init__.py new file mode 100644 index 0000000..68e853b --- /dev/null +++ b/saasus_sdk_python/src/auth/__init__.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.auth.api.auth_info_api import AuthInfoApi +from saasus_sdk_python.src.auth.api.basic_info_api import BasicInfoApi +from saasus_sdk_python.src.auth.api.credential_api import CredentialApi +from saasus_sdk_python.src.auth.api.env_api import EnvApi +from saasus_sdk_python.src.auth.api.error_api import ErrorApi +from saasus_sdk_python.src.auth.api.invitation_api import InvitationApi +from saasus_sdk_python.src.auth.api.role_api import RoleApi +from saasus_sdk_python.src.auth.api.saas_user_api import SaasUserApi +from saasus_sdk_python.src.auth.api.single_tenant_api import SingleTenantApi +from saasus_sdk_python.src.auth.api.tenant_api import TenantApi +from saasus_sdk_python.src.auth.api.tenant_attribute_api import TenantAttributeApi +from saasus_sdk_python.src.auth.api.tenant_user_api import TenantUserApi +from saasus_sdk_python.src.auth.api.user_attribute_api import UserAttributeApi +from saasus_sdk_python.src.auth.api.user_info_api import UserInfoApi + +# import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.configuration import Configuration +from saasus_sdk_python.src.auth.exceptions import OpenApiException +from saasus_sdk_python.src.auth.exceptions import ApiTypeError +from saasus_sdk_python.src.auth.exceptions import ApiValueError +from saasus_sdk_python.src.auth.exceptions import ApiKeyError +from saasus_sdk_python.src.auth.exceptions import ApiAttributeError +from saasus_sdk_python.src.auth.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.attribute_type import AttributeType +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.models.error import Error +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.models.invitation_status import InvitationStatus +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner +from saasus_sdk_python.src.auth.models.invoice_language import InvoiceLanguage +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from saasus_sdk_python.src.auth.models.provider_name import ProviderName +from saasus_sdk_python.src.auth.models.provider_type import ProviderType +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.models.saas_id import SaasId +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam diff --git a/saasus_sdk_python/src/auth/api/__init__.py b/saasus_sdk_python/src/auth/api/__init__.py new file mode 100644 index 0000000..d1e3ef5 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/__init__.py @@ -0,0 +1,18 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.auth.api.auth_info_api import AuthInfoApi +from saasus_sdk_python.src.auth.api.basic_info_api import BasicInfoApi +from saasus_sdk_python.src.auth.api.credential_api import CredentialApi +from saasus_sdk_python.src.auth.api.env_api import EnvApi +from saasus_sdk_python.src.auth.api.error_api import ErrorApi +from saasus_sdk_python.src.auth.api.invitation_api import InvitationApi +from saasus_sdk_python.src.auth.api.role_api import RoleApi +from saasus_sdk_python.src.auth.api.saas_user_api import SaasUserApi +from saasus_sdk_python.src.auth.api.single_tenant_api import SingleTenantApi +from saasus_sdk_python.src.auth.api.tenant_api import TenantApi +from saasus_sdk_python.src.auth.api.tenant_attribute_api import TenantAttributeApi +from saasus_sdk_python.src.auth.api.tenant_user_api import TenantUserApi +from saasus_sdk_python.src.auth.api.user_attribute_api import UserAttributeApi +from saasus_sdk_python.src.auth.api.user_info_api import UserInfoApi + diff --git a/saasus_sdk_python/src/auth/api/auth_info_api.py b/saasus_sdk_python/src/auth/api/auth_info_api.py new file mode 100644 index 0000000..b03bed1 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/auth_info_api.py @@ -0,0 +1,876 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AuthInfoApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_auth_info(self, **kwargs) -> AuthInfo: # noqa: E501 + """Get Authentication Info # noqa: E501 + + Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AuthInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_auth_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_auth_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_auth_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication Info # noqa: E501 + + Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AuthInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_auth_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "AuthInfo", + '500': "Error", + } + + return self.api_client.call_api( + '/auth-info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_identity_providers(self, **kwargs) -> IdentityProviders: # noqa: E501 + """Get Sign-In Information Via External Provider # noqa: E501 + + Get sign-in information via external provider set in cognito. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_identity_providers(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: IdentityProviders + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_identity_providers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_identity_providers_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_identity_providers_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Sign-In Information Via External Provider # noqa: E501 + + Get sign-in information via external provider set in cognito. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_identity_providers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(IdentityProviders, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_identity_providers" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "IdentityProviders", + '500': "Error", + } + + return self.api_client.call_api( + '/identity-providers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_sign_in_settings(self, **kwargs) -> SignInSettings: # noqa: E501 + """Get Password Requirements # noqa: E501 + + Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_sign_in_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SignInSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_sign_in_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_sign_in_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_sign_in_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Password Requirements # noqa: E501 + + Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_sign_in_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SignInSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sign_in_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SignInSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/sign-in-settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_auth_info(self, body : Optional[AuthInfo] = None, **kwargs) -> None: # noqa: E501 + """Update Authentication Info # noqa: E501 + + Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_auth_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: AuthInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_auth_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_auth_info_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def update_auth_info_with_http_info(self, body : Optional[AuthInfo] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Authentication Info # noqa: E501 + + Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_auth_info_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: AuthInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_auth_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/auth-info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_identity_provider(self, update_identity_provider_param : Optional[UpdateIdentityProviderParam] = None, **kwargs) -> None: # noqa: E501 + """Update Sign-In Information # noqa: E501 + + Update the sign-in information for the external ID provider # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_identity_provider(update_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param update_identity_provider_param: + :type update_identity_provider_param: UpdateIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_identity_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_identity_provider_with_http_info(update_identity_provider_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_identity_provider_with_http_info(self, update_identity_provider_param : Optional[UpdateIdentityProviderParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Sign-In Information # noqa: E501 + + Update the sign-in information for the external ID provider # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_identity_provider_with_http_info(update_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param update_identity_provider_param: + :type update_identity_provider_param: UpdateIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_identity_provider_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_identity_provider" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_identity_provider_param'] is not None: + _body_params = _params['update_identity_provider_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/identity-providers', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_sign_in_settings(self, update_sign_in_settings_param : Optional[UpdateSignInSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update Password Requirements # noqa: E501 + + Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_sign_in_settings(update_sign_in_settings_param, async_req=True) + >>> result = thread.get() + + :param update_sign_in_settings_param: + :type update_sign_in_settings_param: UpdateSignInSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_sign_in_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_sign_in_settings_with_http_info(update_sign_in_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_sign_in_settings_with_http_info(self, update_sign_in_settings_param : Optional[UpdateSignInSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Password Requirements # noqa: E501 + + Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_sign_in_settings_with_http_info(update_sign_in_settings_param, async_req=True) + >>> result = thread.get() + + :param update_sign_in_settings_param: + :type update_sign_in_settings_param: UpdateSignInSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_sign_in_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_sign_in_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_sign_in_settings_param'] is not None: + _body_params = _params['update_sign_in_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/sign-in-settings', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/basic_info_api.py b/saasus_sdk_python/src/auth/api/basic_info_api.py new file mode 100644 index 0000000..6097584 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/basic_info_api.py @@ -0,0 +1,1155 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class BasicInfoApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def find_notification_messages(self, **kwargs) -> NotificationMessages: # noqa: E501 + """Get Notification Email Templates # noqa: E501 + + Get notification email templates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.find_notification_messages(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NotificationMessages + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the find_notification_messages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.find_notification_messages_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def find_notification_messages_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Notification Email Templates # noqa: E501 + + Get notification email templates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.find_notification_messages_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NotificationMessages, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method find_notification_messages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "NotificationMessages", + '500': "Error", + } + + return self.api_client.call_api( + '/notification-messages', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_basic_info(self, **kwargs) -> BasicInfo: # noqa: E501 + """Get Basic Configurations # noqa: E501 + + Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_basic_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BasicInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_basic_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_basic_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_basic_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Basic Configurations # noqa: E501 + + Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_basic_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BasicInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_basic_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "BasicInfo", + '500': "Error", + } + + return self.api_client.call_api( + '/basic-info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customize_page_settings(self, **kwargs) -> CustomizePageSettings: # noqa: E501 + """Get Authentication Authorization Basic Information # noqa: E501 + + Get authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_page_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CustomizePageSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customize_page_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customize_page_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_customize_page_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication Authorization Basic Information # noqa: E501 + + Get authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_page_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CustomizePageSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customize_page_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CustomizePageSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/customize-page-settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customize_pages(self, **kwargs) -> CustomizePages: # noqa: E501 + """Get Authentication Page Setting # noqa: E501 + + Get the authentication screen setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_pages(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CustomizePages + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customize_pages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customize_pages_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_customize_pages_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication Page Setting # noqa: E501 + + Get the authentication screen setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_pages_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CustomizePages, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customize_pages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CustomizePages", + '500': "Error", + } + + return self.api_client.call_api( + '/customize-pages', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_basic_info(self, update_basic_info_param : Optional[UpdateBasicInfoParam] = None, **kwargs) -> None: # noqa: E501 + """Update Basic Configurations # noqa: E501 + + Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_basic_info(update_basic_info_param, async_req=True) + >>> result = thread.get() + + :param update_basic_info_param: + :type update_basic_info_param: UpdateBasicInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_basic_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_basic_info_with_http_info(update_basic_info_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_basic_info_with_http_info(self, update_basic_info_param : Optional[UpdateBasicInfoParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Basic Configurations # noqa: E501 + + Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_basic_info_with_http_info(update_basic_info_param, async_req=True) + >>> result = thread.get() + + :param update_basic_info_param: + :type update_basic_info_param: UpdateBasicInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_basic_info_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_basic_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_basic_info_param'] is not None: + _body_params = _params['update_basic_info_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/basic-info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_customize_page_settings(self, update_customize_page_settings_param : Optional[UpdateCustomizePageSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update Authentication Authorization Basic Information # noqa: E501 + + Update authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_page_settings(update_customize_page_settings_param, async_req=True) + >>> result = thread.get() + + :param update_customize_page_settings_param: + :type update_customize_page_settings_param: UpdateCustomizePageSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_customize_page_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_customize_page_settings_with_http_info(update_customize_page_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_customize_page_settings_with_http_info(self, update_customize_page_settings_param : Optional[UpdateCustomizePageSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Authentication Authorization Basic Information # noqa: E501 + + Update authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_page_settings_with_http_info(update_customize_page_settings_param, async_req=True) + >>> result = thread.get() + + :param update_customize_page_settings_param: + :type update_customize_page_settings_param: UpdateCustomizePageSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_customize_page_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_customize_page_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_customize_page_settings_param'] is not None: + _body_params = _params['update_customize_page_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/customize-page-settings', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_customize_pages(self, update_customize_pages_param : Optional[UpdateCustomizePagesParam] = None, **kwargs) -> None: # noqa: E501 + """Authentication Page Setting # noqa: E501 + + Update the authentication page setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_pages(update_customize_pages_param, async_req=True) + >>> result = thread.get() + + :param update_customize_pages_param: + :type update_customize_pages_param: UpdateCustomizePagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_customize_pages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_customize_pages_with_http_info(update_customize_pages_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_customize_pages_with_http_info(self, update_customize_pages_param : Optional[UpdateCustomizePagesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Authentication Page Setting # noqa: E501 + + Update the authentication page setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_pages_with_http_info(update_customize_pages_param, async_req=True) + >>> result = thread.get() + + :param update_customize_pages_param: + :type update_customize_pages_param: UpdateCustomizePagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_customize_pages_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_customize_pages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_customize_pages_param'] is not None: + _body_params = _params['update_customize_pages_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/customize-pages', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_notification_messages(self, update_notification_messages_param : Optional[UpdateNotificationMessagesParam] = None, **kwargs) -> None: # noqa: E501 + """Update Notification Email Template # noqa: E501 + + Update notification email template. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_notification_messages(update_notification_messages_param, async_req=True) + >>> result = thread.get() + + :param update_notification_messages_param: + :type update_notification_messages_param: UpdateNotificationMessagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_notification_messages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_notification_messages_with_http_info(update_notification_messages_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_notification_messages_with_http_info(self, update_notification_messages_param : Optional[UpdateNotificationMessagesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Notification Email Template # noqa: E501 + + Update notification email template. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_notification_messages_with_http_info(update_notification_messages_param, async_req=True) + >>> result = thread.get() + + :param update_notification_messages_param: + :type update_notification_messages_param: UpdateNotificationMessagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_notification_messages_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_notification_messages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_notification_messages_param'] is not None: + _body_params = _params['update_notification_messages_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/notification-messages', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/credential_api.py b/saasus_sdk_python/src/auth/api/credential_api.py new file mode 100644 index 0000000..8a0f2c5 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/credential_api.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CredentialApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_auth_credentials(self, body : Optional[Credentials] = None, **kwargs) -> AuthorizationTempCode: # noqa: E501 + """Save Authentication/Authorization Information # noqa: E501 + + Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_auth_credentials(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Credentials + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AuthorizationTempCode + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_auth_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_auth_credentials_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_auth_credentials_with_http_info(self, body : Optional[Credentials] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Save Authentication/Authorization Information # noqa: E501 + + Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_auth_credentials_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Credentials + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AuthorizationTempCode, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_auth_credentials" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "AuthorizationTempCode", + '400': "Error", + '401': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/credentials', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_auth_credentials(self, code : Annotated[Optional[StrictStr], Field(description="Temp Code")] = None, auth_flow : Annotated[Optional[StrictStr], Field(description="Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth ")] = None, refresh_token : Annotated[Optional[StrictStr], Field(description="Refresh Token")] = None, **kwargs) -> Credentials: # noqa: E501 + """Get Authentication/Authorization Information # noqa: E501 + + Get ID token, access token, and refresh token using a temporary code or a refresh token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_credentials(code, auth_flow, refresh_token, async_req=True) + >>> result = thread.get() + + :param code: Temp Code + :type code: str + :param auth_flow: Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth + :type auth_flow: str + :param refresh_token: Refresh Token + :type refresh_token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Credentials + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_auth_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_auth_credentials_with_http_info(code, auth_flow, refresh_token, **kwargs) # noqa: E501 + + @validate_arguments + def get_auth_credentials_with_http_info(self, code : Annotated[Optional[StrictStr], Field(description="Temp Code")] = None, auth_flow : Annotated[Optional[StrictStr], Field(description="Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth ")] = None, refresh_token : Annotated[Optional[StrictStr], Field(description="Refresh Token")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication/Authorization Information # noqa: E501 + + Get ID token, access token, and refresh token using a temporary code or a refresh token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_credentials_with_http_info(code, auth_flow, refresh_token, async_req=True) + >>> result = thread.get() + + :param code: Temp Code + :type code: str + :param auth_flow: Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth + :type auth_flow: str + :param refresh_token: Refresh Token + :type refresh_token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Credentials, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'code', + 'auth_flow', + 'refresh_token' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_auth_credentials" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('code') is not None: # noqa: E501 + _query_params.append(('code', _params['code'])) + + if _params.get('auth_flow') is not None: # noqa: E501 + _query_params.append(('auth-flow', _params['auth_flow'])) + + if _params.get('refresh_token') is not None: # noqa: E501 + _query_params.append(('refresh-token', _params['refresh_token'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Credentials", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/credentials', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/env_api.py b/saasus_sdk_python/src/auth/api/env_api.py new file mode 100644 index 0000000..d030382 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/env_api.py @@ -0,0 +1,757 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictInt + +from typing import Optional + +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EnvApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_env(self, body : Optional[Env] = None, **kwargs) -> Env: # noqa: E501 + """Create Env Info # noqa: E501 + + Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_env(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Env + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Env + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_env_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_env_with_http_info(self, body : Optional[Env] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Env Info # noqa: E501 + + Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_env_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Env + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Env, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Env", + '500': "Error", + } + + return self.api_client.call_api( + '/envs', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_env(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> None: # noqa: E501 + """Delete Env Info # noqa: E501 + + Delete env info. Env with id 3 cannot be deleted. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_env(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_env_with_http_info(env_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Env Info # noqa: E501 + + Delete env info. Env with id 3 cannot be deleted. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_env_with_http_info(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'env_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/envs/{env_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_env(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> Env: # noqa: E501 + """Get Env Details # noqa: E501 + + Get environment details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_env(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Env + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_env_with_http_info(env_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Env Details # noqa: E501 + + Get environment details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_env_with_http_info(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Env, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'env_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Env", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/envs/{env_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_envs(self, **kwargs) -> Envs: # noqa: E501 + """Get Env Info # noqa: E501 + + Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_envs(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Envs + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_envs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_envs_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_envs_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Env Info # noqa: E501 + + Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_envs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Envs, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_envs" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Envs", + '500': "Error", + } + + return self.api_client.call_api( + '/envs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_env(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], update_env_param : Optional[UpdateEnvParam] = None, **kwargs) -> None: # noqa: E501 + """Update Env Info # noqa: E501 + + Update env info. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_env(env_id, update_env_param, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param update_env_param: + :type update_env_param: UpdateEnvParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_env_with_http_info(env_id, update_env_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], update_env_param : Optional[UpdateEnvParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Env Info # noqa: E501 + + Update env info. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_env_with_http_info(env_id, update_env_param, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param update_env_param: + :type update_env_param: UpdateEnvParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'env_id', + 'update_env_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_env_param'] is not None: + _body_params = _params['update_env_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/envs/{env_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/error_api.py b/saasus_sdk_python/src/auth/api/error_api.py new file mode 100644 index 0000000..cfe618b --- /dev/null +++ b/saasus_sdk_python/src/auth/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/invitation_api.py b/saasus_sdk_python/src/auth/api/invitation_api.py new file mode 100644 index 0000000..ac58e4d --- /dev/null +++ b/saasus_sdk_python/src/auth/api/invitation_api.py @@ -0,0 +1,933 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class InvitationApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant_invitation(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_invitation_param : Optional[CreateTenantInvitationParam] = None, **kwargs) -> Invitation: # noqa: E501 + """Create Tenant Invitation # noqa: E501 + + Create an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_invitation(tenant_id, create_tenant_invitation_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_invitation_param: + :type create_tenant_invitation_param: CreateTenantInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Invitation + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_invitation_with_http_info(tenant_id, create_tenant_invitation_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_invitation_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_invitation_param : Optional[CreateTenantInvitationParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant Invitation # noqa: E501 + + Create an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_invitation_with_http_info(tenant_id, create_tenant_invitation_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_invitation_param: + :type create_tenant_invitation_param: CreateTenantInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Invitation, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'create_tenant_invitation_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_tenant_invitation_param'] is not None: + _body_params = _params['create_tenant_invitation_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Invitation", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_invitation(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> None: # noqa: E501 + """Delete Tenant Invitation # noqa: E501 + + Delete an invitation for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_invitation(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_invitation_with_http_info(tenant_id, invitation_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_invitation_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant Invitation # noqa: E501 + + Delete an invitation for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_invitation_with_http_info(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'invitation_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations/{invitation_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_invitation_validity(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> InvitationValidity: # noqa: E501 + """Get Invitation Validity # noqa: E501 + + Get the validity of an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_invitation_validity(invitation_id, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: InvitationValidity + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_invitation_validity_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_invitation_validity_with_http_info(invitation_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_invitation_validity_with_http_info(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Invitation Validity # noqa: E501 + + Get the validity of an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_invitation_validity_with_http_info(invitation_id, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(InvitationValidity, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'invitation_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_invitation_validity" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "InvitationValidity", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/invitations/{invitation_id}/validity', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_invitation(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> Invitation: # noqa: E501 + """Get Tenant Invitation # noqa: E501 + + Get invitation information for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitation(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Invitation + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_invitation_with_http_info(tenant_id, invitation_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_invitation_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Invitation # noqa: E501 + + Get invitation information for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitation_with_http_info(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Invitation, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'invitation_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Invitation", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations/{invitation_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_invitations(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> Invitations: # noqa: E501 + """Get Tenant Invitations # noqa: E501 + + Get a list of invitations to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitations(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Invitations + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_invitations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_invitations_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_invitations_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Invitations # noqa: E501 + + Get a list of invitations to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitations_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Invitations, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_invitations" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Invitations", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def validate_invitation(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], validate_invitation_param : Optional[ValidateInvitationParam] = None, **kwargs) -> None: # noqa: E501 + """Validate Invitation # noqa: E501 + + Validate an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.validate_invitation(invitation_id, validate_invitation_param, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param validate_invitation_param: + :type validate_invitation_param: ValidateInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the validate_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.validate_invitation_with_http_info(invitation_id, validate_invitation_param, **kwargs) # noqa: E501 + + @validate_arguments + def validate_invitation_with_http_info(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], validate_invitation_param : Optional[ValidateInvitationParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Validate Invitation # noqa: E501 + + Validate an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.validate_invitation_with_http_info(invitation_id, validate_invitation_param, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param validate_invitation_param: + :type validate_invitation_param: ValidateInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'invitation_id', + 'validate_invitation_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method validate_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['validate_invitation_param'] is not None: + _body_params = _params['validate_invitation_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/invitations/{invitation_id}/validate', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/role_api.py b/saasus_sdk_python/src/auth/api/role_api.py new file mode 100644 index 0000000..500a94e --- /dev/null +++ b/saasus_sdk_python/src/auth/api/role_api.py @@ -0,0 +1,463 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.models.roles import Roles + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class RoleApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_role(self, body : Optional[Role] = None, **kwargs) -> Role: # noqa: E501 + """Create Role # noqa: E501 + + Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_role(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Role + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Role + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_role_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_role_with_http_info(self, body : Optional[Role] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Role # noqa: E501 + + Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_role_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Role + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Role, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_role" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Role", + '500': "Error", + } + + return self.api_client.call_api( + '/roles', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_role(self, role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> None: # noqa: E501 + """Delete Role # noqa: E501 + + Delete role. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_role(role_name, async_req=True) + >>> result = thread.get() + + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_role_with_http_info(role_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_role_with_http_info(self, role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Role # noqa: E501 + + Delete role. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_role_with_http_info(role_name, async_req=True) + >>> result = thread.get() + + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'role_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_role" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['role_name']: + _path_params['role_name'] = _params['role_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/roles/{role_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_roles(self, **kwargs) -> Roles: # noqa: E501 + """Get Roles # noqa: E501 + + Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_roles(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Roles + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_roles_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_roles_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Roles # noqa: E501 + + Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_roles_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Roles, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_roles" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Roles", + '500': "Error", + } + + return self.api_client.call_api( + '/roles', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/saas_user_api.py b/saasus_sdk_python/src/auth/api/saas_user_api.py new file mode 100644 index 0000000..9b192b6 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/saas_user_api.py @@ -0,0 +1,3144 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SaasUserApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def confirm_email_update(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], confirm_email_update_param : Optional[ConfirmEmailUpdateParam] = None, **kwargs) -> None: # noqa: E501 + """Confirm User Email Update # noqa: E501 + + Verify the code to confirm the user's email address update. Requires the user's access token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_email_update(user_id, confirm_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param confirm_email_update_param: + :type confirm_email_update_param: ConfirmEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the confirm_email_update_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.confirm_email_update_with_http_info(user_id, confirm_email_update_param, **kwargs) # noqa: E501 + + @validate_arguments + def confirm_email_update_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], confirm_email_update_param : Optional[ConfirmEmailUpdateParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Confirm User Email Update # noqa: E501 + + Verify the code to confirm the user's email address update. Requires the user's access token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_email_update_with_http_info(user_id, confirm_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param confirm_email_update_param: + :type confirm_email_update_param: ConfirmEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'confirm_email_update_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_email_update" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['confirm_email_update_param'] is not None: + _body_params = _params['confirm_email_update_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/email/confirm', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def confirm_external_user_link(self, confirm_external_user_link_param : Optional[ConfirmExternalUserLinkParam] = None, **kwargs) -> None: # noqa: E501 + """Confirm External User Account Link # noqa: E501 + + Verify the code for external account user link confirmation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_external_user_link(confirm_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param confirm_external_user_link_param: + :type confirm_external_user_link_param: ConfirmExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the confirm_external_user_link_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.confirm_external_user_link_with_http_info(confirm_external_user_link_param, **kwargs) # noqa: E501 + + @validate_arguments + def confirm_external_user_link_with_http_info(self, confirm_external_user_link_param : Optional[ConfirmExternalUserLinkParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Confirm External User Account Link # noqa: E501 + + Verify the code for external account user link confirmation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_external_user_link_with_http_info(confirm_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param confirm_external_user_link_param: + :type confirm_external_user_link_param: ConfirmExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'confirm_external_user_link_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_external_user_link" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['confirm_external_user_link_param'] is not None: + _body_params = _params['confirm_external_user_link_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/external-users/confirm', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def confirm_sign_up_with_aws_marketplace(self, confirm_sign_up_with_aws_marketplace_param : Optional[ConfirmSignUpWithAwsMarketplaceParam] = None, **kwargs) -> Tenant: # noqa: E501 + """Confirm Sign Up with AWS Marketplace # noqa: E501 + + Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param confirm_sign_up_with_aws_marketplace_param: + :type confirm_sign_up_with_aws_marketplace_param: ConfirmSignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Tenant + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the confirm_sign_up_with_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.confirm_sign_up_with_aws_marketplace_with_http_info(confirm_sign_up_with_aws_marketplace_param, **kwargs) # noqa: E501 + + @validate_arguments + def confirm_sign_up_with_aws_marketplace_with_http_info(self, confirm_sign_up_with_aws_marketplace_param : Optional[ConfirmSignUpWithAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Confirm Sign Up with AWS Marketplace # noqa: E501 + + Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_sign_up_with_aws_marketplace_with_http_info(confirm_sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param confirm_sign_up_with_aws_marketplace_param: + :type confirm_sign_up_with_aws_marketplace_param: ConfirmSignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Tenant, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'confirm_sign_up_with_aws_marketplace_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_sign_up_with_aws_marketplace" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['confirm_sign_up_with_aws_marketplace_param'] is not None: + _body_params = _params['confirm_sign_up_with_aws_marketplace_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Tenant", + '500': "Error", + } + + return self.api_client.call_api( + '/aws-marketplace/sign-up-confirm', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> SaasUser: # noqa: E501 + """Create SaaS User # noqa: E501 + + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user(create_saas_user_param, async_req=True) + >>> result = thread.get() + + :param create_saas_user_param: + :type create_saas_user_param: CreateSaasUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_saas_user_with_http_info(create_saas_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_saas_user_with_http_info(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create SaaS User # noqa: E501 + + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user_with_http_info(create_saas_user_param, async_req=True) + >>> result = thread.get() + + :param create_saas_user_param: + :type create_saas_user_param: CreateSaasUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'create_saas_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_saas_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_saas_user_param'] is not None: + _body_params = _params['create_saas_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SaasUser", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_secret_code(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], create_secret_code_param : Optional[CreateSecretCodeParam] = None, **kwargs) -> SoftwareTokenSecretCode: # noqa: E501 + """Create secret code for authentication application registration # noqa: E501 + + Create a secret code for authentication application registration. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_secret_code(user_id, create_secret_code_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param create_secret_code_param: + :type create_secret_code_param: CreateSecretCodeParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SoftwareTokenSecretCode + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_secret_code_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_secret_code_with_http_info(user_id, create_secret_code_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_secret_code_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], create_secret_code_param : Optional[CreateSecretCodeParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create secret code for authentication application registration # noqa: E501 + + Create a secret code for authentication application registration. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_secret_code_with_http_info(user_id, create_secret_code_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param create_secret_code_param: + :type create_secret_code_param: CreateSecretCodeParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SoftwareTokenSecretCode, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'create_secret_code_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_secret_code" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_secret_code_param'] is not None: + _body_params = _params['create_secret_code_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SoftwareTokenSecretCode", + '500': "Error", + } + + return self.api_client.call_api( + '/users/{user_id}/mfa/software-token/secret-code', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_saas_user(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> None: # noqa: E501 + """Delete User # noqa: E501 + + Delete all users with matching user ID from the tenant and SaaS. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_saas_user(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_saas_user_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_saas_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete User # noqa: E501 + + Delete all users with matching user ID from the tenant and SaaS. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_saas_user_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_saas_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_saas_user(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> SaasUser: # noqa: E501 + """Get User # noqa: E501 + + Get user information based on user ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_user(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_saas_user_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_saas_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User # noqa: E501 + + Get user information based on user ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_user_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_saas_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SaasUser", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/users/{user_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_saas_users(self, **kwargs) -> SaasUsers: # noqa: E501 + """Get Users # noqa: E501 + + Get all SaaS users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_users(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUsers + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_saas_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_saas_users_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_saas_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Users # noqa: E501 + + Get all SaaS users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUsers, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_saas_users" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SaasUsers", + '500': "Error", + } + + return self.api_client.call_api( + '/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_user_mfa_preference(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> MfaPreference: # noqa: E501 + """Get User's MFA Settings # noqa: E501 + + Get the user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_mfa_preference(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MfaPreference + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_mfa_preference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_mfa_preference_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_user_mfa_preference_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User's MFA Settings # noqa: E501 + + Get the user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_mfa_preference_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MfaPreference, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_mfa_preference" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MfaPreference", + '500': "Error", + } + + return self.api_client.call_api( + '/users/{user_id}/mfa/preference', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def link_aws_marketplace(self, link_aws_marketplace_param : Optional[LinkAwsMarketplaceParam] = None, **kwargs) -> None: # noqa: E501 + """Link an existing tenant with AWS Marketplace # noqa: E501 + + Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_aws_marketplace(link_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param link_aws_marketplace_param: + :type link_aws_marketplace_param: LinkAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the link_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.link_aws_marketplace_with_http_info(link_aws_marketplace_param, **kwargs) # noqa: E501 + + @validate_arguments + def link_aws_marketplace_with_http_info(self, link_aws_marketplace_param : Optional[LinkAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Link an existing tenant with AWS Marketplace # noqa: E501 + + Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_aws_marketplace_with_http_info(link_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param link_aws_marketplace_param: + :type link_aws_marketplace_param: LinkAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'link_aws_marketplace_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method link_aws_marketplace" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['link_aws_marketplace_param'] is not None: + _body_params = _params['link_aws_marketplace_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/aws-marketplace/link', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def request_email_update(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], request_email_update_param : Optional[RequestEmailUpdateParam] = None, **kwargs) -> None: # noqa: E501 + """Request User Email Update # noqa: E501 + + Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_email_update(user_id, request_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param request_email_update_param: + :type request_email_update_param: RequestEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the request_email_update_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.request_email_update_with_http_info(user_id, request_email_update_param, **kwargs) # noqa: E501 + + @validate_arguments + def request_email_update_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], request_email_update_param : Optional[RequestEmailUpdateParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Request User Email Update # noqa: E501 + + Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_email_update_with_http_info(user_id, request_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param request_email_update_param: + :type request_email_update_param: RequestEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'request_email_update_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method request_email_update" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['request_email_update_param'] is not None: + _body_params = _params['request_email_update_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/email/request', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def request_external_user_link(self, request_external_user_link_param : Optional[RequestExternalUserLinkParam] = None, **kwargs) -> None: # noqa: E501 + """Request External User Account Link # noqa: E501 + + Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_external_user_link(request_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param request_external_user_link_param: + :type request_external_user_link_param: RequestExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the request_external_user_link_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.request_external_user_link_with_http_info(request_external_user_link_param, **kwargs) # noqa: E501 + + @validate_arguments + def request_external_user_link_with_http_info(self, request_external_user_link_param : Optional[RequestExternalUserLinkParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Request External User Account Link # noqa: E501 + + Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_external_user_link_with_http_info(request_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param request_external_user_link_param: + :type request_external_user_link_param: RequestExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'request_external_user_link_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method request_external_user_link" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['request_external_user_link_param'] is not None: + _body_params = _params['request_external_user_link_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/external-users/request', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def resend_sign_up_confirmation_email(self, resend_sign_up_confirmation_email_param : Optional[ResendSignUpConfirmationEmailParam] = None, **kwargs) -> None: # noqa: E501 + """Resend Sign Up Confirmation Email # noqa: E501 + + Resend temporary password for the new registered user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param, async_req=True) + >>> result = thread.get() + + :param resend_sign_up_confirmation_email_param: + :type resend_sign_up_confirmation_email_param: ResendSignUpConfirmationEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the resend_sign_up_confirmation_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.resend_sign_up_confirmation_email_with_http_info(resend_sign_up_confirmation_email_param, **kwargs) # noqa: E501 + + @validate_arguments + def resend_sign_up_confirmation_email_with_http_info(self, resend_sign_up_confirmation_email_param : Optional[ResendSignUpConfirmationEmailParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Resend Sign Up Confirmation Email # noqa: E501 + + Resend temporary password for the new registered user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.resend_sign_up_confirmation_email_with_http_info(resend_sign_up_confirmation_email_param, async_req=True) + >>> result = thread.get() + + :param resend_sign_up_confirmation_email_param: + :type resend_sign_up_confirmation_email_param: ResendSignUpConfirmationEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'resend_sign_up_confirmation_email_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method resend_sign_up_confirmation_email" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['resend_sign_up_confirmation_email_param'] is not None: + _body_params = _params['resend_sign_up_confirmation_email_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/sign-up/resend', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def sign_up(self, sign_up_param : Optional[SignUpParam] = None, **kwargs) -> SaasUser: # noqa: E501 + """Sign Up # noqa: E501 + + Register a new user. A temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up(sign_up_param, async_req=True) + >>> result = thread.get() + + :param sign_up_param: + :type sign_up_param: SignUpParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the sign_up_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.sign_up_with_http_info(sign_up_param, **kwargs) # noqa: E501 + + @validate_arguments + def sign_up_with_http_info(self, sign_up_param : Optional[SignUpParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Sign Up # noqa: E501 + + Register a new user. A temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up_with_http_info(sign_up_param, async_req=True) + >>> result = thread.get() + + :param sign_up_param: + :type sign_up_param: SignUpParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'sign_up_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sign_up" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['sign_up_param'] is not None: + _body_params = _params['sign_up_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SaasUser", + '500': "Error", + } + + return self.api_client.call_api( + '/sign-up', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def sign_up_with_aws_marketplace(self, sign_up_with_aws_marketplace_param : Optional[SignUpWithAwsMarketplaceParam] = None, **kwargs) -> SaasUser: # noqa: E501 + """Sign Up with AWS Marketplace # noqa: E501 + + Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param sign_up_with_aws_marketplace_param: + :type sign_up_with_aws_marketplace_param: SignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the sign_up_with_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.sign_up_with_aws_marketplace_with_http_info(sign_up_with_aws_marketplace_param, **kwargs) # noqa: E501 + + @validate_arguments + def sign_up_with_aws_marketplace_with_http_info(self, sign_up_with_aws_marketplace_param : Optional[SignUpWithAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Sign Up with AWS Marketplace # noqa: E501 + + Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up_with_aws_marketplace_with_http_info(sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param sign_up_with_aws_marketplace_param: + :type sign_up_with_aws_marketplace_param: SignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'sign_up_with_aws_marketplace_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sign_up_with_aws_marketplace" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['sign_up_with_aws_marketplace_param'] is not None: + _body_params = _params['sign_up_with_aws_marketplace_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SaasUser", + '500': "Error", + } + + return self.api_client.call_api( + '/aws-marketplace/sign-up', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def unlink_provider(self, provider_name : StrictStr, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> None: # noqa: E501 + """Unlink external identity providers # noqa: E501 + + Unlink external identity providers. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.unlink_provider(provider_name, user_id, async_req=True) + >>> result = thread.get() + + :param provider_name: (required) + :type provider_name: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the unlink_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.unlink_provider_with_http_info(provider_name, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def unlink_provider_with_http_info(self, provider_name : StrictStr, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Unlink external identity providers # noqa: E501 + + Unlink external identity providers. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.unlink_provider_with_http_info(provider_name, user_id, async_req=True) + >>> result = thread.get() + + :param provider_name: (required) + :type provider_name: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'provider_name', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method unlink_provider" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['provider_name']: + _path_params['provider_name'] = _params['provider_name'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/providers/{provider_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_saas_user_attributes(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_attributes_param : Optional[UpdateSaasUserAttributesParam] = None, **kwargs) -> None: # noqa: E501 + """Update SaaS User Attributes # noqa: E501 + + Update the additional attributes of the SaaS user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_attributes(user_id, update_saas_user_attributes_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_attributes_param: + :type update_saas_user_attributes_param: UpdateSaasUserAttributesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_saas_user_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_saas_user_attributes_with_http_info(user_id, update_saas_user_attributes_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_saas_user_attributes_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_attributes_param : Optional[UpdateSaasUserAttributesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update SaaS User Attributes # noqa: E501 + + Update the additional attributes of the SaaS user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_attributes_with_http_info(user_id, update_saas_user_attributes_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_attributes_param: + :type update_saas_user_attributes_param: UpdateSaasUserAttributesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_saas_user_attributes_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_saas_user_attributes" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_saas_user_attributes_param'] is not None: + _body_params = _params['update_saas_user_attributes_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/attributes', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_saas_user_email(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_email_param : Optional[UpdateSaasUserEmailParam] = None, **kwargs) -> None: # noqa: E501 + """Change Email # noqa: E501 + + Change user's email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_email(user_id, update_saas_user_email_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_email_param: + :type update_saas_user_email_param: UpdateSaasUserEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_saas_user_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_saas_user_email_with_http_info(user_id, update_saas_user_email_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_saas_user_email_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_email_param : Optional[UpdateSaasUserEmailParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Change Email # noqa: E501 + + Change user's email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_email_with_http_info(user_id, update_saas_user_email_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_email_param: + :type update_saas_user_email_param: UpdateSaasUserEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_saas_user_email_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_saas_user_email" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_saas_user_email_param'] is not None: + _body_params = _params['update_saas_user_email_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/email', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_saas_user_password(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_password_param : Optional[UpdateSaasUserPasswordParam] = None, **kwargs) -> None: # noqa: E501 + """Change Password # noqa: E501 + + Change user's login password. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_password(user_id, update_saas_user_password_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_password_param: + :type update_saas_user_password_param: UpdateSaasUserPasswordParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_saas_user_password_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_saas_user_password_with_http_info(user_id, update_saas_user_password_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_saas_user_password_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_password_param : Optional[UpdateSaasUserPasswordParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Change Password # noqa: E501 + + Change user's login password. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_password_with_http_info(user_id, update_saas_user_password_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_password_param: + :type update_saas_user_password_param: UpdateSaasUserPasswordParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_saas_user_password_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_saas_user_password" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_saas_user_password_param'] is not None: + _body_params = _params['update_saas_user_password_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/password', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_software_token(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_software_token_param : Optional[UpdateSoftwareTokenParam] = None, **kwargs) -> None: # noqa: E501 + """Register Authentication Application # noqa: E501 + + Register an authentication application. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_software_token(user_id, update_software_token_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_software_token_param: + :type update_software_token_param: UpdateSoftwareTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_software_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_software_token_with_http_info(user_id, update_software_token_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_software_token_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_software_token_param : Optional[UpdateSoftwareTokenParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Register Authentication Application # noqa: E501 + + Register an authentication application. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_software_token_with_http_info(user_id, update_software_token_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_software_token_param: + :type update_software_token_param: UpdateSoftwareTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_software_token_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_software_token" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_software_token_param'] is not None: + _body_params = _params['update_software_token_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/mfa/software-token', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_user_mfa_preference(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], body : Optional[MfaPreference] = None, **kwargs) -> None: # noqa: E501 + """Update User's MFA Settings # noqa: E501 + + Update user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_user_mfa_preference(user_id, body, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param body: + :type body: MfaPreference + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_user_mfa_preference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_user_mfa_preference_with_http_info(user_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_user_mfa_preference_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], body : Optional[MfaPreference] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update User's MFA Settings # noqa: E501 + + Update user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_user_mfa_preference_with_http_info(user_id, body, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param body: + :type body: MfaPreference + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_user_mfa_preference" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/mfa/preference', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/single_tenant_api.py b/saasus_sdk_python/src/auth/api/single_tenant_api.py new file mode 100644 index 0000000..14613b6 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/single_tenant_api.py @@ -0,0 +1,452 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SingleTenantApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_cloud_formation_launch_stack_link_for_single_tenant(self, **kwargs) -> CloudFormationLaunchStackLink: # noqa: E501 + """Get CloudFormation Stack Launch Link For Single Tenant # noqa: E501 + + Get the CloudFormation stack activation link for Single Tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link_for_single_tenant(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CloudFormationLaunchStackLink + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get CloudFormation Stack Launch Link For Single Tenant # noqa: E501 + + Get the CloudFormation stack activation link for Single Tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CloudFormationLaunchStackLink, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cloud_formation_launch_stack_link_for_single_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CloudFormationLaunchStackLink", + '500': "Error", + } + + return self.api_client.call_api( + '/single-tenant/cloudformation-launch-stack-link', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_single_tenant_settings(self, **kwargs) -> SingleTenantSettings: # noqa: E501 + """Retrieve the settings of the single tenant. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_single_tenant_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SingleTenantSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_single_tenant_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_single_tenant_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_single_tenant_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Retrieve the settings of the single tenant. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_single_tenant_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SingleTenantSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_single_tenant_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SingleTenantSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/single-tenant/settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_single_tenant_settings(self, update_single_tenant_settings_param : Optional[UpdateSingleTenantSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update configuration information for single-tenant functionality # noqa: E501 + + Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_single_tenant_settings(update_single_tenant_settings_param, async_req=True) + >>> result = thread.get() + + :param update_single_tenant_settings_param: + :type update_single_tenant_settings_param: UpdateSingleTenantSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_single_tenant_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_single_tenant_settings_with_http_info(update_single_tenant_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_single_tenant_settings_with_http_info(self, update_single_tenant_settings_param : Optional[UpdateSingleTenantSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update configuration information for single-tenant functionality # noqa: E501 + + Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_single_tenant_settings_with_http_info(update_single_tenant_settings_param, async_req=True) + >>> result = thread.get() + + :param update_single_tenant_settings_param: + :type update_single_tenant_settings_param: UpdateSingleTenantSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_single_tenant_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_single_tenant_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_single_tenant_settings_param'] is not None: + _body_params = _params['update_single_tenant_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/single-tenant/settings', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/tenant_api.py b/saasus_sdk_python/src/auth/api/tenant_api.py new file mode 100644 index 0000000..7d06488 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/tenant_api.py @@ -0,0 +1,1886 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TenantApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant(self, body : Optional[TenantProps] = None, **kwargs) -> Tenant: # noqa: E501 + """Create Tenant # noqa: E501 + + Create a tenant managed by the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Tenant + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_with_http_info(self, body : Optional[TenantProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant # noqa: E501 + + Create a tenant managed by the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Tenant, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Tenant", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_tenant_and_pricing(self, **kwargs) -> None: # noqa: E501 + """Stripe Initial Setting # noqa: E501 + + Set Stripe initial information via billing # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_and_pricing(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_and_pricing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_and_pricing_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_and_pricing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Stripe Initial Setting # noqa: E501 + + Set Stripe initial information via billing # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_and_pricing_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_and_pricing" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/init', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_stripe_tenant_and_pricing(self, **kwargs) -> None: # noqa: E501 + """Delete Customer and Product From Stripe # noqa: E501 + + Delete customer and product from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_tenant_and_pricing(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_stripe_tenant_and_pricing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_stripe_tenant_and_pricing_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_stripe_tenant_and_pricing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Customer and Product From Stripe # noqa: E501 + + Delete customer and product from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_tenant_and_pricing_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stripe_tenant_and_pricing" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> None: # noqa: E501 + """Delete Tenant # noqa: E501 + + Delete SaaSus Platform tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant # noqa: E501 + + Delete SaaSus Platform tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_stripe_customer(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> StripeCustomer: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: StripeCustomer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_stripe_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_stripe_customer_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_stripe_customer_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StripeCustomer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stripe_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "StripeCustomer", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/stripe-customer', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> TenantDetail: # noqa: E501 + """Get Tenant Details # noqa: E501 + + Get the details of tenant managed on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TenantDetail + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Details # noqa: E501 + + Get the details of tenant managed on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TenantDetail, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TenantDetail", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_identity_providers(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> TenantIdentityProviders: # noqa: E501 + """Get identity provider per tenant # noqa: E501 + + Get sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_identity_providers(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TenantIdentityProviders + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_identity_providers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_identity_providers_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_identity_providers_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get identity provider per tenant # noqa: E501 + + Get sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_identity_providers_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TenantIdentityProviders, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_identity_providers" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TenantIdentityProviders", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/identity-providers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenants(self, **kwargs) -> Tenants: # noqa: E501 + """Get Tenants # noqa: E501 + + Get tenants managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenants(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Tenants + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenants_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenants_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_tenants_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenants # noqa: E501 + + Get tenants managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenants_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Tenants, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenants" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Tenants", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def reset_plan(self, **kwargs) -> None: # noqa: E501 + """Delete all information related to rate plans # noqa: E501 + + Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reset_plan(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the reset_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.reset_plan_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def reset_plan_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete all information related to rate plans # noqa: E501 + + Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reset_plan_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method reset_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/reset', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[TenantProps] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant Details # noqa: E501 + + Update SaaSus Platform tenant details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_with_http_info(tenant_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[TenantProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant Details # noqa: E501 + + Update SaaSus Platform tenant details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_with_http_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_billing_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[BillingInfo] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant Billing Information # noqa: E501 + + Update SaaSus Platform tenant billing information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_billing_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: BillingInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_billing_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_billing_info_with_http_info(tenant_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_billing_info_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[BillingInfo] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant Billing Information # noqa: E501 + + Update SaaSus Platform tenant billing information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_billing_info_with_http_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: BillingInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_billing_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/billing-info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_identity_provider(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], update_tenant_identity_provider_param : Optional[UpdateTenantIdentityProviderParam] = None, **kwargs) -> None: # noqa: E501 + """Update identity provider per tenant # noqa: E501 + + Update sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param update_tenant_identity_provider_param: + :type update_tenant_identity_provider_param: UpdateTenantIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_identity_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_identity_provider_with_http_info(tenant_id, update_tenant_identity_provider_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_identity_provider_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], update_tenant_identity_provider_param : Optional[UpdateTenantIdentityProviderParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update identity provider per tenant # noqa: E501 + + Update sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_identity_provider_with_http_info(tenant_id, update_tenant_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param update_tenant_identity_provider_param: + :type update_tenant_identity_provider_param: UpdateTenantIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'update_tenant_identity_provider_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_identity_provider" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_tenant_identity_provider_param'] is not None: + _body_params = _params['update_tenant_identity_provider_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/identity-providers', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_plan(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[PlanReservation] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant Plan Information # noqa: E501 + + Update SaaSus Platform tenant plan information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_plan(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: PlanReservation + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_plan_with_http_info(tenant_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_plan_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[PlanReservation] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant Plan Information # noqa: E501 + + Update SaaSus Platform tenant plan information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_plan_with_http_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: PlanReservation + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/plans', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/tenant_attribute_api.py b/saasus_sdk_python/src/auth/api/tenant_attribute_api.py new file mode 100644 index 0000000..6cce104 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/tenant_attribute_api.py @@ -0,0 +1,463 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TenantAttributeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 + """Create Tenant Attribute # noqa: E501 + + Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_attribute(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Attribute + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_attribute_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant Attribute # noqa: E501 + + Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_attribute_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Attribute", + '500': "Error", + } + + return self.api_client.call_api( + '/tenant-attributes', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_attribute(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> None: # noqa: E501 + """Delete Tenant Attribute # noqa: E501 + + Deletes tenant attributes managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_attribute(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_attribute_with_http_info(attribute_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_attribute_with_http_info(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant Attribute # noqa: E501 + + Deletes tenant attributes managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_attribute_with_http_info(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'attribute_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['attribute_name']: + _path_params['attribute_name'] = _params['attribute_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenant-attributes/{attribute_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_attributes(self, **kwargs) -> TenantAttributes: # noqa: E501 + """Get Tenant Attributes # noqa: E501 + + Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_attributes(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TenantAttributes + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_attributes_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_attributes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Attributes # noqa: E501 + + Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_attributes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TenantAttributes, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_attributes" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TenantAttributes", + '500': "Error", + } + + return self.api_client.call_api( + '/tenant-attributes', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/tenant_user_api.py b/saasus_sdk_python/src/auth/api/tenant_user_api.py new file mode 100644 index 0000000..570ceb0 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/tenant_user_api.py @@ -0,0 +1,1401 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.models.users import Users + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TenantUserApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_user_param : Optional[CreateTenantUserParam] = None, **kwargs) -> User: # noqa: E501 + """Create Tenant User # noqa: E501 + + Create a tenant user. If attributes is empty, the additional attributes will be created empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user(tenant_id, create_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_user_param: + :type create_tenant_user_param: CreateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: User + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_user_with_http_info(tenant_id, create_tenant_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_user_param : Optional[CreateTenantUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant User # noqa: E501 + + Create a tenant user. If attributes is empty, the additional attributes will be created empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user_with_http_info(tenant_id, create_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_user_param: + :type create_tenant_user_param: CreateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'create_tenant_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_tenant_user_param'] is not None: + _body_params = _params['create_tenant_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "User", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_tenant_user_roles(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], create_tenant_user_roles_param : Optional[CreateTenantUserRolesParam] = None, **kwargs) -> None: # noqa: E501 + """Create Tenant User Role # noqa: E501 + + Create roles on tenant users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param create_tenant_user_roles_param: + :type create_tenant_user_roles_param: CreateTenantUserRolesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_user_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_user_roles_with_http_info(tenant_id, user_id, env_id, create_tenant_user_roles_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_user_roles_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], create_tenant_user_roles_param : Optional[CreateTenantUserRolesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant User Role # noqa: E501 + + Create roles on tenant users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user_roles_with_http_info(tenant_id, user_id, env_id, create_tenant_user_roles_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param create_tenant_user_roles_param: + :type create_tenant_user_roles_param: CreateTenantUserRolesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id', + 'env_id', + 'create_tenant_user_roles_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_user_roles" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_tenant_user_roles_param'] is not None: + _body_params = _params['create_tenant_user_roles_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> None: # noqa: E501 + """Delete Tenant User # noqa: E501 + + Delete a user from the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_user_with_http_info(tenant_id, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant User # noqa: E501 + + Delete a user from the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user_with_http_info(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_user_role(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> None: # noqa: E501 + """Remove Role From Tenant User # noqa: E501 + + Remove a role from a tenant user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user_role(tenant_id, user_id, env_id, role_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_user_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_user_role_with_http_info(tenant_id, user_id, env_id, role_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_user_role_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> ApiResponse: # noqa: E501 + """Remove Role From Tenant User # noqa: E501 + + Remove a role from a tenant user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user_role_with_http_info(tenant_id, user_id, env_id, role_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id', + 'env_id', + 'role_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_user_role" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + if _params['role_name']: + _path_params['role_name'] = _params['role_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_all_tenant_user(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> Users: # noqa: E501 + """Get User Info # noqa: E501 + + Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_user(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Users + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_all_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_all_tenant_user_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_all_tenant_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User Info # noqa: E501 + + Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_user_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Users", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/all/users/{user_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_all_tenant_users(self, **kwargs) -> Users: # noqa: E501 + """Get Users # noqa: E501 + + Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_users(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Users + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_all_tenant_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_all_tenant_users_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_all_tenant_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Users # noqa: E501 + + Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_tenant_users" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Users", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/all/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> User: # noqa: E501 + """Get Tenant User # noqa: E501 + + Get one tenant user by specific ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_user(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: User + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_user_with_http_info(tenant_id, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant User # noqa: E501 + + Get one tenant user by specific ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_user_with_http_info(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "User", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_users(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> Users: # noqa: E501 + """Get Tenant Users # noqa: E501 + + Get all the users belonging to the tenant. Id is unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_users(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Users + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_users_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_users_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Users # noqa: E501 + + Get all the users belonging to the tenant. Id is unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_users_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_users" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Users", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], update_tenant_user_param : Optional[UpdateTenantUserParam] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant User Attribute # noqa: E501 + + Update tenant user attributes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_user(tenant_id, user_id, update_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param update_tenant_user_param: + :type update_tenant_user_param: UpdateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_user_with_http_info(tenant_id, user_id, update_tenant_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], update_tenant_user_param : Optional[UpdateTenantUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant User Attribute # noqa: E501 + + Update tenant user attributes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_user_with_http_info(tenant_id, user_id, update_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param update_tenant_user_param: + :type update_tenant_user_param: UpdateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id', + 'update_tenant_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_tenant_user_param'] is not None: + _body_params = _params['update_tenant_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/user_attribute_api.py b/saasus_sdk_python/src/auth/api/user_attribute_api.py new file mode 100644 index 0000000..47aa8cc --- /dev/null +++ b/saasus_sdk_python/src/auth/api/user_attribute_api.py @@ -0,0 +1,610 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UserAttributeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_saas_user_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 + """Create SaaS User Attributes # noqa: E501 + + Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user_attribute(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Attribute + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_saas_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_saas_user_attribute_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_saas_user_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create SaaS User Attributes # noqa: E501 + + Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user_attribute_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_saas_user_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Attribute", + '500': "Error", + } + + return self.api_client.call_api( + '/saas-user-attributes', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_user_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 + """Create User Attributes # noqa: E501 + + Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_user_attribute(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Attribute + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_user_attribute_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_user_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create User Attributes # noqa: E501 + + Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_user_attribute_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_user_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Attribute", + '500': "Error", + } + + return self.api_client.call_api( + '/user-attributes', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_user_attribute(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> None: # noqa: E501 + """Delete User Attribute # noqa: E501 + + Delete user attributes kept on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user_attribute(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_user_attribute_with_http_info(attribute_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_user_attribute_with_http_info(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete User Attribute # noqa: E501 + + Delete user attributes kept on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user_attribute_with_http_info(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'attribute_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['attribute_name']: + _path_params['attribute_name'] = _params['attribute_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/user-attributes/{attribute_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_user_attributes(self, **kwargs) -> UserAttributes: # noqa: E501 + """Get User Attributes # noqa: E501 + + Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_attributes(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserAttributes + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_attributes_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_user_attributes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get User Attributes # noqa: E501 + + Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_attributes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserAttributes, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_attributes" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "UserAttributes", + '500': "Error", + } + + return self.api_client.call_api( + '/user-attributes', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api/user_info_api.py b/saasus_sdk_python/src/auth/api/user_info_api.py new file mode 100644 index 0000000..e971797 --- /dev/null +++ b/saasus_sdk_python/src/auth/api/user_info_api.py @@ -0,0 +1,326 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UserInfoApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_user_info(self, token : Annotated[StrictStr, Field(..., description="ID Token")], **kwargs) -> UserInfo: # noqa: E501 + """Get User Info # noqa: E501 + + User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info(token, async_req=True) + >>> result = thread.get() + + :param token: ID Token (required) + :type token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_info_with_http_info(token, **kwargs) # noqa: E501 + + @validate_arguments + def get_user_info_with_http_info(self, token : Annotated[StrictStr, Field(..., description="ID Token")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User Info # noqa: E501 + + User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info_with_http_info(token, async_req=True) + >>> result = thread.get() + + :param token: ID Token (required) + :type token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'token' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('token') is not None: # noqa: E501 + _query_params.append(('token', _params['token'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "UserInfo", + '401': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/userinfo', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_user_info_by_email(self, email : Annotated[StrictStr, Field(..., description="Email")], **kwargs) -> UserInfo: # noqa: E501 + """Get User Info by Email # noqa: E501 + + Get user information by email address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info_by_email(email, async_req=True) + >>> result = thread.get() + + :param email: Email (required) + :type email: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_info_by_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_info_by_email_with_http_info(email, **kwargs) # noqa: E501 + + @validate_arguments + def get_user_info_by_email_with_http_info(self, email : Annotated[StrictStr, Field(..., description="Email")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User Info by Email # noqa: E501 + + Get user information by email address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info_by_email_with_http_info(email, async_req=True) + >>> result = thread.get() + + :param email: Email (required) + :type email: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'email' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_info_by_email" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('email') is not None: # noqa: E501 + _query_params.append(('email', _params['email'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "UserInfo", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/userinfo/search/email', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/auth/api_client.py b/saasus_sdk_python/src/auth/api_client.py new file mode 100644 index 0000000..f86e35d --- /dev/null +++ b/saasus_sdk_python/src/auth/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.auth.configuration import Configuration +from saasus_sdk_python.src.auth.api_response import ApiResponse +import saasus_sdk_python.src.auth.models +from saasus_sdk_python.src.auth import rest +from saasus_sdk_python.src.auth.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.auth.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/src/auth/api_response.py b/saasus_sdk_python/src/auth/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/saasus_sdk_python/src/auth/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/saasus_sdk_python/src/auth/configuration.py b/saasus_sdk_python/src/auth/configuration.py new file mode 100644 index 0000000..b97d621 --- /dev/null +++ b/saasus_sdk_python/src/auth/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.auth.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/auth" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.auth") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/auth", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/auth/exceptions.py b/saasus_sdk_python/src/auth/exceptions.py new file mode 100644 index 0000000..9e8bf2a --- /dev/null +++ b/saasus_sdk_python/src/auth/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/auth/models/__init__.py b/saasus_sdk_python/src/auth/models/__init__.py new file mode 100644 index 0000000..083e14d --- /dev/null +++ b/saasus_sdk_python/src/auth/models/__init__.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.attribute_type import AttributeType +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.models.error import Error +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.models.invitation_status import InvitationStatus +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner +from saasus_sdk_python.src.auth.models.invoice_language import InvoiceLanguage +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from saasus_sdk_python.src.auth.models.provider_name import ProviderName +from saasus_sdk_python.src.auth.models.provider_type import ProviderType +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.models.saas_id import SaasId +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam diff --git a/saasus_sdk_python/src/auth/models/account_verification.py b/saasus_sdk_python/src/auth/models/account_verification.py new file mode 100644 index 0000000..6f2b9a0 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/account_verification.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class AccountVerification(BaseModel): + """ + Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + """ + verification_method: StrictStr = Field(..., description="code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. ") + sending_to: StrictStr = Field(..., description="email: e-mail sms: SMS smsOrEmail: email if SMS is not possible ") + __properties = ["verification_method", "sending_to"] + + @field_validator('verification_method') + @classmethod + def verification_method_validate_enum(cls, value): + """Validates the enum""" + if value not in ('code', 'link'): + raise ValueError("must be one of enum values ('code', 'link')") + return value + + @field_validator('sending_to') + @classmethod + def sending_to_validate_enum(cls, value): + """Validates the enum""" + if value not in ('email', 'sms', 'smsOrEmail'): + raise ValueError("must be one of enum values ('email', 'sms', 'smsOrEmail')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> AccountVerification: + """Create an instance of AccountVerification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AccountVerification: + """Create an instance of AccountVerification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return AccountVerification.parse_obj(obj) + + _obj = AccountVerification.parse_obj({ + "verification_method": obj.get("verification_method"), + "sending_to": obj.get("sending_to") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/api_keys.py b/saasus_sdk_python/src/auth/models/api_keys.py new file mode 100644 index 0000000..ebfc6c8 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/api_keys.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class ApiKeys(BaseModel): + """ + ApiKeys + """ + api_keys: Annotated[List[StrictStr], Field()] = Field(..., description="API Key") + __properties = ["api_keys"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ApiKeys: + """Create an instance of ApiKeys from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiKeys: + """Create an instance of ApiKeys from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ApiKeys.parse_obj(obj) + + _obj = ApiKeys.parse_obj({ + "api_keys": obj.get("api_keys") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/attribute.py b/saasus_sdk_python/src/auth/models/attribute.py new file mode 100644 index 0000000..47d7cbd --- /dev/null +++ b/saasus_sdk_python/src/auth/models/attribute.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.attribute_type import AttributeType + +class Attribute(BaseModel): + """ + Attribute + """ + attribute_name: StrictStr = Field(..., description="Attribute Name") + display_name: StrictStr = Field(..., description="Display Name") + attribute_type: AttributeType = Field(...) + __properties = ["attribute_name", "display_name", "attribute_type"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Attribute: + """Create an instance of Attribute from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Attribute: + """Create an instance of Attribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Attribute.parse_obj(obj) + + _obj = Attribute.parse_obj({ + "attribute_name": obj.get("attribute_name"), + "display_name": obj.get("display_name"), + "attribute_type": obj.get("attribute_type") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/attribute_type.py b/saasus_sdk_python/src/auth/models/attribute_type.py new file mode 100644 index 0000000..df4b2bb --- /dev/null +++ b/saasus_sdk_python/src/auth/models/attribute_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class AttributeType(str, Enum): + """ + Type (date can be set to YYYY-MM-DD format.) + """ + + """ + allowed enum values + """ + STRING = 'string' + NUMBER = 'number' + BOOL = 'bool' + DATE = 'date' + + @classmethod + def from_json(cls, json_str: str) -> AttributeType: + """Create an instance of AttributeType from a JSON string""" + return AttributeType(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/auth/models/auth_info.py b/saasus_sdk_python/src/auth/models/auth_info.py new file mode 100644 index 0000000..ec22163 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/auth_info.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class AuthInfo(BaseModel): + """ + AuthInfo + """ + callback_url: StrictStr = Field(..., description="Redirect After Authentication") + __properties = ["callback_url"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> AuthInfo: + """Create an instance of AuthInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AuthInfo: + """Create an instance of AuthInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return AuthInfo.parse_obj(obj) + + _obj = AuthInfo.parse_obj({ + "callback_url": obj.get("callback_url") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/authorization_temp_code.py b/saasus_sdk_python/src/auth/models/authorization_temp_code.py new file mode 100644 index 0000000..60b3ca8 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/authorization_temp_code.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class AuthorizationTempCode(BaseModel): + """ + AuthorizationTempCode + """ + code: StrictStr = Field(...) + __properties = ["code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> AuthorizationTempCode: + """Create an instance of AuthorizationTempCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AuthorizationTempCode: + """Create an instance of AuthorizationTempCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return AuthorizationTempCode.parse_obj(obj) + + _obj = AuthorizationTempCode.parse_obj({ + "code": obj.get("code") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/basic_info.py b/saasus_sdk_python/src/auth/models/basic_info.py new file mode 100644 index 0000000..ac9ba52 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/basic_info.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord +from typing_extensions import Annotated + +class BasicInfo(BaseModel): + """ + BasicInfo + """ + domain_name: StrictStr = Field(..., description="Domain Name") + is_dns_validated: StrictBool = Field(..., description="DNS Record Verification Results") + certificate_dns_record: DnsRecord = Field(...) + cloud_front_dns_record: DnsRecord = Field(...) + dkim_dns_records: Annotated[List[DnsRecord], Field()] = Field(..., description="DKIM DNS Records") + default_domain_name: StrictStr = Field(..., description="Default Domain Name") + from_email_address: StrictStr = Field(..., description="Sender Email for Authentication Email") + reply_email_address: StrictStr = Field(..., description="Reply-from email address of authentication email") + is_ses_sandbox_granted: StrictBool = Field(..., description="SES sandbox release and Cognito SES configuration results") + __properties = ["domain_name", "is_dns_validated", "certificate_dns_record", "cloud_front_dns_record", "dkim_dns_records", "default_domain_name", "from_email_address", "reply_email_address", "is_ses_sandbox_granted"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> BasicInfo: + """Create an instance of BasicInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of certificate_dns_record + if self.certificate_dns_record: + _dict['certificate_dns_record'] = self.certificate_dns_record.to_dict() + # override the default output from pydantic by calling `to_dict()` of cloud_front_dns_record + if self.cloud_front_dns_record: + _dict['cloud_front_dns_record'] = self.cloud_front_dns_record.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dkim_dns_records (list) + _items = [] + if self.dkim_dns_records: + for _item in self.dkim_dns_records: + if _item: + _items.append(_item.to_dict()) + _dict['dkim_dns_records'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BasicInfo: + """Create an instance of BasicInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return BasicInfo.parse_obj(obj) + + _obj = BasicInfo.parse_obj({ + "domain_name": obj.get("domain_name"), + "is_dns_validated": obj.get("is_dns_validated"), + "certificate_dns_record": DnsRecord.from_dict(obj.get("certificate_dns_record")) if obj.get("certificate_dns_record") is not None else None, + "cloud_front_dns_record": DnsRecord.from_dict(obj.get("cloud_front_dns_record")) if obj.get("cloud_front_dns_record") is not None else None, + "dkim_dns_records": [DnsRecord.from_dict(_item) for _item in obj.get("dkim_dns_records")] if obj.get("dkim_dns_records") is not None else None, + "default_domain_name": obj.get("default_domain_name"), + "from_email_address": obj.get("from_email_address"), + "reply_email_address": obj.get("reply_email_address"), + "is_ses_sandbox_granted": obj.get("is_ses_sandbox_granted") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/billing_address.py b/saasus_sdk_python/src/auth/models/billing_address.py new file mode 100644 index 0000000..d842cf1 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/billing_address.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import field_validator, StringConstraints, ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class BillingAddress(BaseModel): + """ + BillingAddress + """ + street: StrictStr = Field(..., description="Street address, apartment or suite number.") + city: StrictStr = Field(..., description="City, district, suburb, town, or village.") + state: StrictStr = Field(..., description="State name or abbreviation.") + country: Annotated[str, StringConstraints(strict=True)] = Field(..., description="Country of the address using ISO 3166-1 alpha-2 code.") + additional_address_info: Optional[StrictStr] = Field(None, description="Additional information about the address, such as a building name, floor, or department name.") + postal_code: StrictStr = Field(..., description="ZIP or postal code.") + __properties = ["street", "city", "state", "country", "additional_address_info", "postal_code"] + + @field_validator('country') + @classmethod + def country_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z]{2}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> BillingAddress: + """Create an instance of BillingAddress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BillingAddress: + """Create an instance of BillingAddress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return BillingAddress.parse_obj(obj) + + _obj = BillingAddress.parse_obj({ + "street": obj.get("street"), + "city": obj.get("city"), + "state": obj.get("state"), + "country": obj.get("country"), + "additional_address_info": obj.get("additional_address_info"), + "postal_code": obj.get("postal_code") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/billing_info.py b/saasus_sdk_python/src/auth/models/billing_info.py new file mode 100644 index 0000000..bbbfe87 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/billing_info.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress +from saasus_sdk_python.src.auth.models.invoice_language import InvoiceLanguage + +class BillingInfo(BaseModel): + """ + BillingInfo + """ + name: StrictStr = Field(..., description="Tenant name for billing") + address: BillingAddress = Field(...) + invoice_language: InvoiceLanguage = Field(...) + __properties = ["name", "address", "invoice_language"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> BillingInfo: + """Create an instance of BillingInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BillingInfo: + """Create an instance of BillingInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return BillingInfo.parse_obj(obj) + + _obj = BillingInfo.parse_obj({ + "name": obj.get("name"), + "address": BillingAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "invoice_language": obj.get("invoice_language") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/client_secret.py b/saasus_sdk_python/src/auth/models/client_secret.py new file mode 100644 index 0000000..5fb42ad --- /dev/null +++ b/saasus_sdk_python/src/auth/models/client_secret.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ClientSecret(BaseModel): + """ + ClientSecret + """ + client_secret: StrictStr = Field(..., description="Client Secret") + __properties = ["client_secret"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ClientSecret: + """Create an instance of ClientSecret from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ClientSecret: + """Create an instance of ClientSecret from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ClientSecret.parse_obj(obj) + + _obj = ClientSecret.parse_obj({ + "client_secret": obj.get("client_secret") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/cloud_formation_launch_stack_link.py b/saasus_sdk_python/src/auth/models/cloud_formation_launch_stack_link.py new file mode 100644 index 0000000..131d308 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/cloud_formation_launch_stack_link.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CloudFormationLaunchStackLink(BaseModel): + """ + CloudFormationLaunchStackLink + """ + link: StrictStr = Field(...) + __properties = ["link"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CloudFormationLaunchStackLink.parse_obj(obj) + + _obj = CloudFormationLaunchStackLink.parse_obj({ + "link": obj.get("link") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/confirm_email_update_param.py b/saasus_sdk_python/src/auth/models/confirm_email_update_param.py new file mode 100644 index 0000000..1821ff7 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/confirm_email_update_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ConfirmEmailUpdateParam(BaseModel): + """ + ConfirmEmailUpdateParam + """ + code: StrictStr = Field(...) + access_token: StrictStr = Field(...) + __properties = ["code", "access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ConfirmEmailUpdateParam: + """Create an instance of ConfirmEmailUpdateParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ConfirmEmailUpdateParam: + """Create an instance of ConfirmEmailUpdateParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ConfirmEmailUpdateParam.parse_obj(obj) + + _obj = ConfirmEmailUpdateParam.parse_obj({ + "code": obj.get("code"), + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/confirm_external_user_link_param.py b/saasus_sdk_python/src/auth/models/confirm_external_user_link_param.py new file mode 100644 index 0000000..9a47fb4 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/confirm_external_user_link_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ConfirmExternalUserLinkParam(BaseModel): + """ + ConfirmExternalUserLinkParam + """ + access_token: StrictStr = Field(...) + code: StrictStr = Field(...) + __properties = ["access_token", "code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ConfirmExternalUserLinkParam: + """Create an instance of ConfirmExternalUserLinkParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ConfirmExternalUserLinkParam: + """Create an instance of ConfirmExternalUserLinkParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ConfirmExternalUserLinkParam.parse_obj(obj) + + _obj = ConfirmExternalUserLinkParam.parse_obj({ + "access_token": obj.get("access_token"), + "code": obj.get("code") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/confirm_sign_up_with_aws_marketplace_param.py b/saasus_sdk_python/src/auth/models/confirm_sign_up_with_aws_marketplace_param.py new file mode 100644 index 0000000..bd409eb --- /dev/null +++ b/saasus_sdk_python/src/auth/models/confirm_sign_up_with_aws_marketplace_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class ConfirmSignUpWithAwsMarketplaceParam(BaseModel): + """ + ConfirmSignUpWithAwsMarketplaceParam + """ + tenant_name: Optional[StrictStr] = Field(None, description="Tenant name") + access_token: StrictStr = Field(..., description="Access token") + registration_token: StrictStr = Field(..., description="Registration Token") + __properties = ["tenant_name", "access_token", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ConfirmSignUpWithAwsMarketplaceParam: + """Create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ConfirmSignUpWithAwsMarketplaceParam: + """Create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ConfirmSignUpWithAwsMarketplaceParam.parse_obj(obj) + + _obj = ConfirmSignUpWithAwsMarketplaceParam.parse_obj({ + "tenant_name": obj.get("tenant_name"), + "access_token": obj.get("access_token"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/create_saas_user_param.py b/saasus_sdk_python/src/auth/models/create_saas_user_param.py new file mode 100644 index 0000000..406e216 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/create_saas_user_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class CreateSaasUserParam(BaseModel): + """ + CreateSaasUserParam + """ + email: StrictStr = Field(..., description="E-mail") + password: Optional[StrictStr] = Field(None, description="Password") + __properties = ["email", "password"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateSaasUserParam: + """Create an instance of CreateSaasUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateSaasUserParam: + """Create an instance of CreateSaasUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateSaasUserParam.parse_obj(obj) + + _obj = CreateSaasUserParam.parse_obj({ + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/create_secret_code_param.py b/saasus_sdk_python/src/auth/models/create_secret_code_param.py new file mode 100644 index 0000000..8e873d4 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/create_secret_code_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateSecretCodeParam(BaseModel): + """ + CreateSecretCodeParam + """ + access_token: StrictStr = Field(..., description="access token") + __properties = ["access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateSecretCodeParam: + """Create an instance of CreateSecretCodeParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateSecretCodeParam: + """Create an instance of CreateSecretCodeParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateSecretCodeParam.parse_obj(obj) + + _obj = CreateSecretCodeParam.parse_obj({ + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/create_tenant_invitation_param.py b/saasus_sdk_python/src/auth/models/create_tenant_invitation_param.py new file mode 100644 index 0000000..6af8ffd --- /dev/null +++ b/saasus_sdk_python/src/auth/models/create_tenant_invitation_param.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner +from typing_extensions import Annotated + +class CreateTenantInvitationParam(BaseModel): + """ + CreateTenantInvitationParam + """ + email: StrictStr = Field(..., description="Email address of the user to be invited") + access_token: StrictStr = Field(..., description="Access token of the user who creates an invitation") + envs: Annotated[List[InvitedUserEnvironmentInformationInner], Field()] = Field(...) + __properties = ["email", "access_token", "envs"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateTenantInvitationParam: + """Create an instance of CreateTenantInvitationParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateTenantInvitationParam: + """Create an instance of CreateTenantInvitationParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateTenantInvitationParam.parse_obj(obj) + + _obj = CreateTenantInvitationParam.parse_obj({ + "email": obj.get("email"), + "access_token": obj.get("access_token"), + "envs": [InvitedUserEnvironmentInformationInner.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/create_tenant_user_param.py b/saasus_sdk_python/src/auth/models/create_tenant_user_param.py new file mode 100644 index 0000000..434f53e --- /dev/null +++ b/saasus_sdk_python/src/auth/models/create_tenant_user_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class CreateTenantUserParam(BaseModel): + """ + CreateTenantUserParam + """ + email: StrictStr = Field(..., description="E-mail") + attributes: Dict[str, Any] = Field(..., description="Attribute information (Get information set by defining user attributes in the SaaS development console) ") + __properties = ["email", "attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateTenantUserParam: + """Create an instance of CreateTenantUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateTenantUserParam: + """Create an instance of CreateTenantUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateTenantUserParam.parse_obj(obj) + + _obj = CreateTenantUserParam.parse_obj({ + "email": obj.get("email"), + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/create_tenant_user_roles_param.py b/saasus_sdk_python/src/auth/models/create_tenant_user_roles_param.py new file mode 100644 index 0000000..1fc87e7 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/create_tenant_user_roles_param.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class CreateTenantUserRolesParam(BaseModel): + """ + CreateTenantUserRolesParam + """ + role_names: Annotated[List[StrictStr], Field()] = Field(..., description="Role Info") + __properties = ["role_names"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateTenantUserRolesParam: + """Create an instance of CreateTenantUserRolesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateTenantUserRolesParam: + """Create an instance of CreateTenantUserRolesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateTenantUserRolesParam.parse_obj(obj) + + _obj = CreateTenantUserRolesParam.parse_obj({ + "role_names": obj.get("role_names") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/credentials.py b/saasus_sdk_python/src/auth/models/credentials.py new file mode 100644 index 0000000..cee5c65 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/credentials.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class Credentials(BaseModel): + """ + Credentials + """ + id_token: StrictStr = Field(..., description="ID token") + access_token: StrictStr = Field(..., description="Access token") + refresh_token: Optional[StrictStr] = Field(None, description="Refresh token") + __properties = ["id_token", "access_token", "refresh_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Credentials: + """Create an instance of Credentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Credentials: + """Create an instance of Credentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Credentials.parse_obj(obj) + + _obj = Credentials.parse_obj({ + "id_token": obj.get("id_token"), + "access_token": obj.get("access_token"), + "refresh_token": obj.get("refresh_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/customize_page_props.py b/saasus_sdk_python/src/auth/models/customize_page_props.py new file mode 100644 index 0000000..6c6a6ed --- /dev/null +++ b/saasus_sdk_python/src/auth/models/customize_page_props.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class CustomizePageProps(BaseModel): + """ + CustomizePageProps + """ + html_contents: StrictStr = Field(..., description="Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. ") + is_terms_of_service: StrictBool = Field(..., description="display the terms of use agreement check box") + is_privacy_policy: StrictBool = Field(..., description="show the privacy policy checkbox") + __properties = ["html_contents", "is_terms_of_service", "is_privacy_policy"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePageProps: + """Create an instance of CustomizePageProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePageProps: + """Create an instance of CustomizePageProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePageProps.parse_obj(obj) + + _obj = CustomizePageProps.parse_obj({ + "html_contents": obj.get("html_contents"), + "is_terms_of_service": obj.get("is_terms_of_service"), + "is_privacy_policy": obj.get("is_privacy_policy") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/customize_page_settings.py b/saasus_sdk_python/src/auth/models/customize_page_settings.py new file mode 100644 index 0000000..0a239cc --- /dev/null +++ b/saasus_sdk_python/src/auth/models/customize_page_settings.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CustomizePageSettings(BaseModel): + """ + CustomizePageSettings + """ + title: StrictStr = Field(..., description="service name") + terms_of_service_url: StrictStr = Field(..., description="terms of service URL") + privacy_policy_url: StrictStr = Field(..., description="privacy policy URL") + google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager container ID") + icon: StrictStr = Field(..., description="service icon") + favicon: StrictStr = Field(..., description="favicon") + __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id", "icon", "favicon"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePageSettings: + """Create an instance of CustomizePageSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePageSettings: + """Create an instance of CustomizePageSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePageSettings.parse_obj(obj) + + _obj = CustomizePageSettings.parse_obj({ + "title": obj.get("title"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "google_tag_manager_container_id": obj.get("google_tag_manager_container_id"), + "icon": obj.get("icon"), + "favicon": obj.get("favicon") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/customize_page_settings_props.py b/saasus_sdk_python/src/auth/models/customize_page_settings_props.py new file mode 100644 index 0000000..04c232a --- /dev/null +++ b/saasus_sdk_python/src/auth/models/customize_page_settings_props.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CustomizePageSettingsProps(BaseModel): + """ + CustomizePageSettingsProps + """ + title: StrictStr = Field(..., description="service name") + terms_of_service_url: StrictStr = Field(..., description="terms of service URL") + privacy_policy_url: StrictStr = Field(..., description="privacy policy URL") + google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager container ID") + __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePageSettingsProps: + """Create an instance of CustomizePageSettingsProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePageSettingsProps: + """Create an instance of CustomizePageSettingsProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePageSettingsProps.parse_obj(obj) + + _obj = CustomizePageSettingsProps.parse_obj({ + "title": obj.get("title"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "google_tag_manager_container_id": obj.get("google_tag_manager_container_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/customize_pages.py b/saasus_sdk_python/src/auth/models/customize_pages.py new file mode 100644 index 0000000..09511e9 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/customize_pages.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +class CustomizePages(BaseModel): + """ + CustomizePages + """ + sign_up_page: CustomizePageProps = Field(...) + sign_in_page: CustomizePageProps = Field(...) + password_reset_page: CustomizePageProps = Field(...) + __properties = ["sign_up_page", "sign_in_page", "password_reset_page"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePages: + """Create an instance of CustomizePages from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up_page + if self.sign_up_page: + _dict['sign_up_page'] = self.sign_up_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of sign_in_page + if self.sign_in_page: + _dict['sign_in_page'] = self.sign_in_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of password_reset_page + if self.password_reset_page: + _dict['password_reset_page'] = self.password_reset_page.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePages: + """Create an instance of CustomizePages from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePages.parse_obj(obj) + + _obj = CustomizePages.parse_obj({ + "sign_up_page": CustomizePageProps.from_dict(obj.get("sign_up_page")) if obj.get("sign_up_page") is not None else None, + "sign_in_page": CustomizePageProps.from_dict(obj.get("sign_in_page")) if obj.get("sign_in_page") is not None else None, + "password_reset_page": CustomizePageProps.from_dict(obj.get("password_reset_page")) if obj.get("password_reset_page") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/device_configuration.py b/saasus_sdk_python/src/auth/models/device_configuration.py new file mode 100644 index 0000000..fe1baa7 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/device_configuration.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class DeviceConfiguration(BaseModel): + """ + Settings for remembering trusted devices + """ + device_remembering: StrictStr = Field(..., description="always: always remember userOptIn: user opt-in no: don't save ") + __properties = ["device_remembering"] + + @field_validator('device_remembering') + @classmethod + def device_remembering_validate_enum(cls, value): + """Validates the enum""" + if value not in ('always', 'userOptIn', 'no'): + raise ValueError("must be one of enum values ('always', 'userOptIn', 'no')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> DeviceConfiguration: + """Create an instance of DeviceConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DeviceConfiguration: + """Create an instance of DeviceConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DeviceConfiguration.parse_obj(obj) + + _obj = DeviceConfiguration.parse_obj({ + "device_remembering": obj.get("device_remembering") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/dns_record.py b/saasus_sdk_python/src/auth/models/dns_record.py new file mode 100644 index 0000000..e9f8d5b --- /dev/null +++ b/saasus_sdk_python/src/auth/models/dns_record.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class DnsRecord(BaseModel): + """ + DnsRecord + """ + type: StrictStr = Field(..., description="CNAME Resource Record") + name: StrictStr = Field(..., description="Record Name") + value: StrictStr = Field(..., description="Value") + __properties = ["type", "name", "value"] + + @field_validator('type') + @classmethod + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in ('CNAME'): + raise ValueError("must be one of enum values ('CNAME')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> DnsRecord: + """Create an instance of DnsRecord from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DnsRecord: + """Create an instance of DnsRecord from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DnsRecord.parse_obj(obj) + + _obj = DnsRecord.parse_obj({ + "type": obj.get("type"), + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/env.py b/saasus_sdk_python/src/auth/models/env.py new file mode 100644 index 0000000..12aff86 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/env.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class Env(BaseModel): + """ + env info + """ + id: StrictInt = Field(...) + name: StrictStr = Field(..., description="env name") + display_name: Optional[StrictStr] = Field(None, description="env display name") + __properties = ["id", "name", "display_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Env: + """Create an instance of Env from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Env: + """Create an instance of Env from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Env.parse_obj(obj) + + _obj = Env.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "display_name": obj.get("display_name") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/envs.py b/saasus_sdk_python/src/auth/models/envs.py new file mode 100644 index 0000000..b67594f --- /dev/null +++ b/saasus_sdk_python/src/auth/models/envs.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.env import Env +from typing_extensions import Annotated + +class Envs(BaseModel): + """ + env list + """ + envs: Annotated[List[Env], Field()] = Field(...) + __properties = ["envs"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Envs: + """Create an instance of Envs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Envs: + """Create an instance of Envs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Envs.parse_obj(obj) + + _obj = Envs.parse_obj({ + "envs": [Env.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/error.py b/saasus_sdk_python/src/auth/models/error.py new file mode 100644 index 0000000..f8d2a5f --- /dev/null +++ b/saasus_sdk_python/src/auth/models/error.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + data: Optional[Dict[str, Any]] = None + __properties = ["type", "message", "data"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message"), + "data": obj.get("data") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/identity_provider_configuration.py b/saasus_sdk_python/src/auth/models/identity_provider_configuration.py new file mode 100644 index 0000000..acab1f5 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/identity_provider_configuration.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class IdentityProviderConfiguration(BaseModel): + """ + This information is required to set up sign-in using an external identity provider. It cannot be changed. + """ + domain: StrictStr = Field(..., description="domain") + redirect_url: StrictStr = Field(..., description="redirect URL") + entity_id: StrictStr = Field(..., description="entity ID") + reply_url: StrictStr = Field(..., description="reply URL") + __properties = ["domain", "redirect_url", "entity_id", "reply_url"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviderConfiguration: + """Create an instance of IdentityProviderConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviderConfiguration: + """Create an instance of IdentityProviderConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviderConfiguration.parse_obj(obj) + + _obj = IdentityProviderConfiguration.parse_obj({ + "domain": obj.get("domain"), + "redirect_url": obj.get("redirect_url"), + "entity_id": obj.get("entity_id"), + "reply_url": obj.get("reply_url") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/identity_provider_props.py b/saasus_sdk_python/src/auth/models/identity_provider_props.py new file mode 100644 index 0000000..2f05670 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/identity_provider_props.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class IdentityProviderProps(BaseModel): + """ + IdentityProviderProps + """ + application_id: StrictStr = Field(...) + application_secret: StrictStr = Field(...) + approval_scope: StrictStr = Field(...) + is_button_hidden: Optional[StrictBool] = None + __properties = ["application_id", "application_secret", "approval_scope", "is_button_hidden"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviderProps: + """Create an instance of IdentityProviderProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviderProps: + """Create an instance of IdentityProviderProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviderProps.parse_obj(obj) + + _obj = IdentityProviderProps.parse_obj({ + "application_id": obj.get("application_id"), + "application_secret": obj.get("application_secret"), + "approval_scope": obj.get("approval_scope"), + "is_button_hidden": obj.get("is_button_hidden") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/identity_provider_saml.py b/saasus_sdk_python/src/auth/models/identity_provider_saml.py new file mode 100644 index 0000000..bc4972c --- /dev/null +++ b/saasus_sdk_python/src/auth/models/identity_provider_saml.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class IdentityProviderSaml(BaseModel): + """ + IdentityProviderSaml + """ + metadata_url: StrictStr = Field(...) + email_attribute: StrictStr = Field(...) + __properties = ["metadata_url", "email_attribute"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviderSaml: + """Create an instance of IdentityProviderSaml from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviderSaml: + """Create an instance of IdentityProviderSaml from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviderSaml.parse_obj(obj) + + _obj = IdentityProviderSaml.parse_obj({ + "metadata_url": obj.get("metadata_url"), + "email_attribute": obj.get("email_attribute") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/identity_providers.py b/saasus_sdk_python/src/auth/models/identity_providers.py new file mode 100644 index 0000000..a8377de --- /dev/null +++ b/saasus_sdk_python/src/auth/models/identity_providers.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +class IdentityProviders(BaseModel): + """ + IdentityProviders + """ + google: IdentityProviderProps = Field(...) + __properties = ["google"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviders: + """Create an instance of IdentityProviders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of google + if self.google: + _dict['google'] = self.google.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviders: + """Create an instance of IdentityProviders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviders.parse_obj(obj) + + _obj = IdentityProviders.parse_obj({ + "google": IdentityProviderProps.from_dict(obj.get("google")) if obj.get("google") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/invitation.py b/saasus_sdk_python/src/auth/models/invitation.py new file mode 100644 index 0000000..560e69b --- /dev/null +++ b/saasus_sdk_python/src/auth/models/invitation.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.invitation_status import InvitationStatus +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from typing_extensions import Annotated + +class Invitation(BaseModel): + """ + Invitation + """ + id: StrictStr = Field(...) + email: StrictStr = Field(..., description="Email address of the invited user") + invitation_url: StrictStr = Field(..., description="Invitation URL") + envs: Annotated[List[UserAvailableEnv], Field()] = Field(...) + expired_at: StrictInt = Field(..., description="Expiration date of the invitation") + status: InvitationStatus = Field(...) + __properties = ["id", "email", "invitation_url", "envs", "expired_at", "status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Invitation: + """Create an instance of Invitation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Invitation: + """Create an instance of Invitation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Invitation.parse_obj(obj) + + _obj = Invitation.parse_obj({ + "id": obj.get("id"), + "email": obj.get("email"), + "invitation_url": obj.get("invitation_url"), + "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None, + "expired_at": obj.get("expired_at"), + "status": obj.get("status") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/invitation_status.py b/saasus_sdk_python/src/auth/models/invitation_status.py new file mode 100644 index 0000000..a36483e --- /dev/null +++ b/saasus_sdk_python/src/auth/models/invitation_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class InvitationStatus(str, Enum): + """ + InvitationStatus + """ + + """ + allowed enum values + """ + PENDING = 'pending' + ACCEPTED = 'accepted' + EXPIRED = 'expired' + + @classmethod + def from_json(cls, json_str: str) -> InvitationStatus: + """Create an instance of InvitationStatus from a JSON string""" + return InvitationStatus(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/auth/models/invitation_validity.py b/saasus_sdk_python/src/auth/models/invitation_validity.py new file mode 100644 index 0000000..23cf1a1 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/invitation_validity.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool + +class InvitationValidity(BaseModel): + """ + Invitation validity + """ + is_valid: StrictBool = Field(..., description="Whether the validation is valid or not") + __properties = ["is_valid"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> InvitationValidity: + """Create an instance of InvitationValidity from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> InvitationValidity: + """Create an instance of InvitationValidity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return InvitationValidity.parse_obj(obj) + + _obj = InvitationValidity.parse_obj({ + "is_valid": obj.get("is_valid") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/invitations.py b/saasus_sdk_python/src/auth/models/invitations.py new file mode 100644 index 0000000..1bb1104 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/invitations.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.invitation import Invitation +from typing_extensions import Annotated + +class Invitations(BaseModel): + """ + Invitations + """ + invitations: Annotated[List[Invitation], Field()] = Field(..., description="Invitation list") + __properties = ["invitations"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Invitations: + """Create an instance of Invitations from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in invitations (list) + _items = [] + if self.invitations: + for _item in self.invitations: + if _item: + _items.append(_item.to_dict()) + _dict['invitations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Invitations: + """Create an instance of Invitations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Invitations.parse_obj(obj) + + _obj = Invitations.parse_obj({ + "invitations": [Invitation.from_dict(_item) for _item in obj.get("invitations")] if obj.get("invitations") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/invited_user_environment_information_inner.py b/saasus_sdk_python/src/auth/models/invited_user_environment_information_inner.py new file mode 100644 index 0000000..cc75912 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/invited_user_environment_information_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from typing_extensions import Annotated + +class InvitedUserEnvironmentInformationInner(BaseModel): + """ + InvitedUserEnvironmentInformationInner + """ + id: StrictInt = Field(...) + role_names: Annotated[List[StrictStr], Field()] = Field(..., description="Role name") + __properties = ["id", "role_names"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> InvitedUserEnvironmentInformationInner: + """Create an instance of InvitedUserEnvironmentInformationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> InvitedUserEnvironmentInformationInner: + """Create an instance of InvitedUserEnvironmentInformationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return InvitedUserEnvironmentInformationInner.parse_obj(obj) + + _obj = InvitedUserEnvironmentInformationInner.parse_obj({ + "id": obj.get("id"), + "role_names": obj.get("role_names") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/invoice_language.py b/saasus_sdk_python/src/auth/models/invoice_language.py new file mode 100644 index 0000000..a65ff51 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/invoice_language.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class InvoiceLanguage(str, Enum): + """ + Language of invoice + """ + + """ + allowed enum values + """ + JA_MINUS_JP = 'ja-JP' + EN_MINUS_US = 'en-US' + + @classmethod + def from_json(cls, json_str: str) -> InvoiceLanguage: + """Create an instance of InvoiceLanguage from a JSON string""" + return InvoiceLanguage(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/auth/models/link_aws_marketplace_param.py b/saasus_sdk_python/src/auth/models/link_aws_marketplace_param.py new file mode 100644 index 0000000..2a39a10 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/link_aws_marketplace_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class LinkAwsMarketplaceParam(BaseModel): + """ + LinkAwsMarketplaceParam + """ + tenant_id: StrictStr = Field(..., description="Tenant ID") + access_token: StrictStr = Field(..., description="Access token") + registration_token: StrictStr = Field(..., description="Registration Token") + __properties = ["tenant_id", "access_token", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> LinkAwsMarketplaceParam: + """Create an instance of LinkAwsMarketplaceParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> LinkAwsMarketplaceParam: + """Create an instance of LinkAwsMarketplaceParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LinkAwsMarketplaceParam.parse_obj(obj) + + _obj = LinkAwsMarketplaceParam.parse_obj({ + "tenant_id": obj.get("tenant_id"), + "access_token": obj.get("access_token"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/message_template.py b/saasus_sdk_python/src/auth/models/message_template.py new file mode 100644 index 0000000..7126dec --- /dev/null +++ b/saasus_sdk_python/src/auth/models/message_template.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class MessageTemplate(BaseModel): + """ + MessageTemplate + """ + subject: StrictStr = Field(..., description="Title") + message: StrictStr = Field(..., description="Message") + __properties = ["subject", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MessageTemplate: + """Create an instance of MessageTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MessageTemplate: + """Create an instance of MessageTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MessageTemplate.parse_obj(obj) + + _obj = MessageTemplate.parse_obj({ + "subject": obj.get("subject"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/mfa_configuration.py b/saasus_sdk_python/src/auth/models/mfa_configuration.py new file mode 100644 index 0000000..a483bce --- /dev/null +++ b/saasus_sdk_python/src/auth/models/mfa_configuration.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class MfaConfiguration(BaseModel): + """ + MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + """ + mfa_configuration: StrictStr = Field(..., description="on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. ") + __properties = ["mfa_configuration"] + + @field_validator('mfa_configuration') + @classmethod + def mfa_configuration_validate_enum(cls, value): + """Validates the enum""" + if value not in ('on', 'optional'): + raise ValueError("must be one of enum values ('on', 'optional')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MfaConfiguration: + """Create an instance of MfaConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MfaConfiguration: + """Create an instance of MfaConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MfaConfiguration.parse_obj(obj) + + _obj = MfaConfiguration.parse_obj({ + "mfa_configuration": obj.get("mfa_configuration") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/mfa_preference.py b/saasus_sdk_python/src/auth/models/mfa_preference.py new file mode 100644 index 0000000..aba7c68 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/mfa_preference.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import field_validator, ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class MfaPreference(BaseModel): + """ + MfaPreference + """ + enabled: StrictBool = Field(..., description="enable MFA") + method: Optional[StrictStr] = Field(None, description="MFA method (required if enabled is true)") + __properties = ["enabled", "method"] + + @field_validator('method') + @classmethod + def method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in ('softwareToken'): + raise ValueError("must be one of enum values ('softwareToken')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MfaPreference: + """Create an instance of MfaPreference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MfaPreference: + """Create an instance of MfaPreference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MfaPreference.parse_obj(obj) + + _obj = MfaPreference.parse_obj({ + "enabled": obj.get("enabled"), + "method": obj.get("method") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/notification_messages.py b/saasus_sdk_python/src/auth/models/notification_messages.py new file mode 100644 index 0000000..ffd0bd0 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/notification_messages.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +class NotificationMessages(BaseModel): + """ + NotificationMessages + """ + sign_up: MessageTemplate = Field(...) + create_user: MessageTemplate = Field(...) + resend_code: MessageTemplate = Field(...) + forgot_password: MessageTemplate = Field(...) + update_user_attribute: MessageTemplate = Field(...) + verify_user_attribute: MessageTemplate = Field(...) + authentication_mfa: MessageTemplate = Field(...) + invite_tenant_user: MessageTemplate = Field(...) + verify_external_user: MessageTemplate = Field(...) + __properties = ["sign_up", "create_user", "resend_code", "forgot_password", "update_user_attribute", "verify_user_attribute", "authentication_mfa", "invite_tenant_user", "verify_external_user"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> NotificationMessages: + """Create an instance of NotificationMessages from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up + if self.sign_up: + _dict['sign_up'] = self.sign_up.to_dict() + # override the default output from pydantic by calling `to_dict()` of create_user + if self.create_user: + _dict['create_user'] = self.create_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of resend_code + if self.resend_code: + _dict['resend_code'] = self.resend_code.to_dict() + # override the default output from pydantic by calling `to_dict()` of forgot_password + if self.forgot_password: + _dict['forgot_password'] = self.forgot_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of update_user_attribute + if self.update_user_attribute: + _dict['update_user_attribute'] = self.update_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_user_attribute + if self.verify_user_attribute: + _dict['verify_user_attribute'] = self.verify_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of authentication_mfa + if self.authentication_mfa: + _dict['authentication_mfa'] = self.authentication_mfa.to_dict() + # override the default output from pydantic by calling `to_dict()` of invite_tenant_user + if self.invite_tenant_user: + _dict['invite_tenant_user'] = self.invite_tenant_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_external_user + if self.verify_external_user: + _dict['verify_external_user'] = self.verify_external_user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> NotificationMessages: + """Create an instance of NotificationMessages from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NotificationMessages.parse_obj(obj) + + _obj = NotificationMessages.parse_obj({ + "sign_up": MessageTemplate.from_dict(obj.get("sign_up")) if obj.get("sign_up") is not None else None, + "create_user": MessageTemplate.from_dict(obj.get("create_user")) if obj.get("create_user") is not None else None, + "resend_code": MessageTemplate.from_dict(obj.get("resend_code")) if obj.get("resend_code") is not None else None, + "forgot_password": MessageTemplate.from_dict(obj.get("forgot_password")) if obj.get("forgot_password") is not None else None, + "update_user_attribute": MessageTemplate.from_dict(obj.get("update_user_attribute")) if obj.get("update_user_attribute") is not None else None, + "verify_user_attribute": MessageTemplate.from_dict(obj.get("verify_user_attribute")) if obj.get("verify_user_attribute") is not None else None, + "authentication_mfa": MessageTemplate.from_dict(obj.get("authentication_mfa")) if obj.get("authentication_mfa") is not None else None, + "invite_tenant_user": MessageTemplate.from_dict(obj.get("invite_tenant_user")) if obj.get("invite_tenant_user") is not None else None, + "verify_external_user": MessageTemplate.from_dict(obj.get("verify_external_user")) if obj.get("verify_external_user") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/password_policy.py b/saasus_sdk_python/src/auth/models/password_policy.py new file mode 100644 index 0000000..f9cd42a --- /dev/null +++ b/saasus_sdk_python/src/auth/models/password_policy.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictInt + +class PasswordPolicy(BaseModel): + """ + Password Policy + """ + minimum_length: StrictInt = Field(..., description="Minimum number of characters") + is_require_lowercase: StrictBool = Field(..., description="Contains one or more lowercase characters") + is_require_numbers: StrictBool = Field(..., description="Contains one or more numeric characters") + is_require_symbols: StrictBool = Field(..., description="Contains one or more special characters") + is_require_uppercase: StrictBool = Field(..., description="Contains one or more uppercase letters") + temporary_password_validity_days: StrictInt = Field(..., description="Temporary password expiration date") + __properties = ["minimum_length", "is_require_lowercase", "is_require_numbers", "is_require_symbols", "is_require_uppercase", "temporary_password_validity_days"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PasswordPolicy: + """Create an instance of PasswordPolicy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PasswordPolicy: + """Create an instance of PasswordPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PasswordPolicy.parse_obj(obj) + + _obj = PasswordPolicy.parse_obj({ + "minimum_length": obj.get("minimum_length"), + "is_require_lowercase": obj.get("is_require_lowercase"), + "is_require_numbers": obj.get("is_require_numbers"), + "is_require_symbols": obj.get("is_require_symbols"), + "is_require_uppercase": obj.get("is_require_uppercase"), + "temporary_password_validity_days": obj.get("temporary_password_validity_days") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/plan_histories.py b/saasus_sdk_python/src/auth/models/plan_histories.py new file mode 100644 index 0000000..f1f142c --- /dev/null +++ b/saasus_sdk_python/src/auth/models/plan_histories.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from typing_extensions import Annotated + +class PlanHistories(BaseModel): + """ + PlanHistories + """ + plan_histories: Annotated[List[PlanHistory], Field()] = Field(..., description="Plan History") + __properties = ["plan_histories"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PlanHistories: + """Create an instance of PlanHistories from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) + _items = [] + if self.plan_histories: + for _item in self.plan_histories: + if _item: + _items.append(_item.to_dict()) + _dict['plan_histories'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PlanHistories: + """Create an instance of PlanHistories from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PlanHistories.parse_obj(obj) + + _obj = PlanHistories.parse_obj({ + "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/plan_history.py b/saasus_sdk_python/src/auth/models/plan_history.py new file mode 100644 index 0000000..eb76548 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/plan_history.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior + +class PlanHistory(BaseModel): + """ + PlanHistory + """ + plan_id: StrictStr = Field(...) + plan_applied_at: StrictInt = Field(..., description="Registration date") + tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + __properties = ["plan_id", "plan_applied_at", "tax_rate_id", "proration_behavior", "delete_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PlanHistory: + """Create an instance of PlanHistory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PlanHistory: + """Create an instance of PlanHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PlanHistory.parse_obj(obj) + + _obj = PlanHistory.parse_obj({ + "plan_id": obj.get("plan_id"), + "plan_applied_at": obj.get("plan_applied_at"), + "tax_rate_id": obj.get("tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/plan_reservation.py b/saasus_sdk_python/src/auth/models/plan_reservation.py new file mode 100644 index 0000000..64118a9 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/plan_reservation.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior + +class PlanReservation(BaseModel): + """ + PlanReservation + """ + next_plan_id: Optional[StrictStr] = None + using_next_plan_from: Optional[StrictInt] = Field(None, description="Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) ") + next_plan_tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + __properties = ["next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "proration_behavior", "delete_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PlanReservation: + """Create an instance of PlanReservation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PlanReservation: + """Create an instance of PlanReservation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PlanReservation.parse_obj(obj) + + _obj = PlanReservation.parse_obj({ + "next_plan_id": obj.get("next_plan_id"), + "using_next_plan_from": obj.get("using_next_plan_from"), + "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/proration_behavior.py b/saasus_sdk_python/src/auth/models/proration_behavior.py new file mode 100644 index 0000000..f29b5c1 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/proration_behavior.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ProrationBehavior(str, Enum): + """ + If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + """ + + """ + allowed enum values + """ + CREATE_PRORATIONS = 'create_prorations' + NONE = 'none' + ALWAYS_INVOICE = 'always_invoice' + + @classmethod + def from_json(cls, json_str: str) -> ProrationBehavior: + """Create an instance of ProrationBehavior from a JSON string""" + return ProrationBehavior(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/auth/models/provider_name.py b/saasus_sdk_python/src/auth/models/provider_name.py new file mode 100644 index 0000000..ee1eebb --- /dev/null +++ b/saasus_sdk_python/src/auth/models/provider_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ProviderName(str, Enum): + """ + ProviderName + """ + + """ + allowed enum values + """ + GOOGLE = 'Google' + + @classmethod + def from_json(cls, json_str: str) -> ProviderName: + """Create an instance of ProviderName from a JSON string""" + return ProviderName(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/auth/models/provider_type.py b/saasus_sdk_python/src/auth/models/provider_type.py new file mode 100644 index 0000000..9004fa0 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/provider_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ProviderType(str, Enum): + """ + ProviderType + """ + + """ + allowed enum values + """ + SAML = 'SAML' + + @classmethod + def from_json(cls, json_str: str) -> ProviderType: + """Create an instance of ProviderType from a JSON string""" + return ProviderType(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/auth/models/recaptcha_props.py b/saasus_sdk_python/src/auth/models/recaptcha_props.py new file mode 100644 index 0000000..6a881e9 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/recaptcha_props.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class RecaptchaProps(BaseModel): + """ + reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + """ + site_key: StrictStr = Field(..., description="site key") + secret_key: StrictStr = Field(..., description="secret key") + __properties = ["site_key", "secret_key"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> RecaptchaProps: + """Create an instance of RecaptchaProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> RecaptchaProps: + """Create an instance of RecaptchaProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RecaptchaProps.parse_obj(obj) + + _obj = RecaptchaProps.parse_obj({ + "site_key": obj.get("site_key"), + "secret_key": obj.get("secret_key") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/request_email_update_param.py b/saasus_sdk_python/src/auth/models/request_email_update_param.py new file mode 100644 index 0000000..6ad6b29 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/request_email_update_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class RequestEmailUpdateParam(BaseModel): + """ + RequestEmailUpdateParam + """ + email: StrictStr = Field(..., description="Email Address") + access_token: StrictStr = Field(...) + __properties = ["email", "access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> RequestEmailUpdateParam: + """Create an instance of RequestEmailUpdateParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> RequestEmailUpdateParam: + """Create an instance of RequestEmailUpdateParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RequestEmailUpdateParam.parse_obj(obj) + + _obj = RequestEmailUpdateParam.parse_obj({ + "email": obj.get("email"), + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/request_external_user_link_param.py b/saasus_sdk_python/src/auth/models/request_external_user_link_param.py new file mode 100644 index 0000000..9dadb64 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/request_external_user_link_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class RequestExternalUserLinkParam(BaseModel): + """ + RequestExternalUserLinkParam + """ + access_token: StrictStr = Field(...) + __properties = ["access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> RequestExternalUserLinkParam: + """Create an instance of RequestExternalUserLinkParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> RequestExternalUserLinkParam: + """Create an instance of RequestExternalUserLinkParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RequestExternalUserLinkParam.parse_obj(obj) + + _obj = RequestExternalUserLinkParam.parse_obj({ + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/resend_sign_up_confirmation_email_param.py b/saasus_sdk_python/src/auth/models/resend_sign_up_confirmation_email_param.py new file mode 100644 index 0000000..d466071 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/resend_sign_up_confirmation_email_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ResendSignUpConfirmationEmailParam(BaseModel): + """ + ResendSignUpConfirmationEmailParam + """ + email: StrictStr = Field(..., description="Email Address") + __properties = ["email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ResendSignUpConfirmationEmailParam: + """Create an instance of ResendSignUpConfirmationEmailParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ResendSignUpConfirmationEmailParam: + """Create an instance of ResendSignUpConfirmationEmailParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ResendSignUpConfirmationEmailParam.parse_obj(obj) + + _obj = ResendSignUpConfirmationEmailParam.parse_obj({ + "email": obj.get("email") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/role.py b/saasus_sdk_python/src/auth/models/role.py new file mode 100644 index 0000000..4204371 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/role.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Role(BaseModel): + """ + role info + """ + role_name: StrictStr = Field(..., description="role name") + display_name: StrictStr = Field(..., description="role display name") + __properties = ["role_name", "display_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Role: + """Create an instance of Role from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Role: + """Create an instance of Role from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Role.parse_obj(obj) + + _obj = Role.parse_obj({ + "role_name": obj.get("role_name"), + "display_name": obj.get("display_name") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/roles.py b/saasus_sdk_python/src/auth/models/roles.py new file mode 100644 index 0000000..7ff104f --- /dev/null +++ b/saasus_sdk_python/src/auth/models/roles.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.role import Role +from typing_extensions import Annotated + +class Roles(BaseModel): + """ + Roles + """ + roles: Annotated[List[Role], Field()] = Field(...) + __properties = ["roles"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Roles: + """Create an instance of Roles from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Roles: + """Create an instance of Roles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Roles.parse_obj(obj) + + _obj = Roles.parse_obj({ + "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/saas_id.py b/saasus_sdk_python/src/auth/models/saas_id.py new file mode 100644 index 0000000..284a42a --- /dev/null +++ b/saasus_sdk_python/src/auth/models/saas_id.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class SaasId(BaseModel): + """ + SaasId + """ + tenant_id: StrictStr = Field(...) + env_id: StrictInt = Field(...) + saas_id: StrictStr = Field(..., description="SaaS ID") + __properties = ["tenant_id", "env_id", "saas_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SaasId: + """Create an instance of SaasId from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SaasId: + """Create an instance of SaasId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SaasId.parse_obj(obj) + + _obj = SaasId.parse_obj({ + "tenant_id": obj.get("tenant_id"), + "env_id": obj.get("env_id"), + "saas_id": obj.get("saas_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/saas_user.py b/saasus_sdk_python/src/auth/models/saas_user.py new file mode 100644 index 0000000..ecc36b7 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/saas_user.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class SaasUser(BaseModel): + """ + SaasUser + """ + id: StrictStr = Field(...) + email: StrictStr = Field(..., description="E-mail") + attributes: Dict[str, Any] = Field(..., description="Attribute information ") + __properties = ["id", "email", "attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SaasUser: + """Create an instance of SaasUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SaasUser: + """Create an instance of SaasUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SaasUser.parse_obj(obj) + + _obj = SaasUser.parse_obj({ + "id": obj.get("id"), + "email": obj.get("email"), + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/saas_users.py b/saasus_sdk_python/src/auth/models/saas_users.py new file mode 100644 index 0000000..642c247 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/saas_users.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from typing_extensions import Annotated + +class SaasUsers(BaseModel): + """ + SaasUsers + """ + users: Annotated[List[SaasUser], Field()] = Field(...) + __properties = ["users"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SaasUsers: + """Create an instance of SaasUsers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SaasUsers: + """Create an instance of SaasUsers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SaasUsers.parse_obj(obj) + + _obj = SaasUsers.parse_obj({ + "users": [SaasUser.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/self_regist.py b/saasus_sdk_python/src/auth/models/self_regist.py new file mode 100644 index 0000000..3f0efa3 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/self_regist.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool + +class SelfRegist(BaseModel): + """ + self sign-up permission + """ + enable: StrictBool = Field(...) + __properties = ["enable"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SelfRegist: + """Create an instance of SelfRegist from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SelfRegist: + """Create an instance of SelfRegist from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SelfRegist.parse_obj(obj) + + _obj = SelfRegist.parse_obj({ + "enable": obj.get("enable") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/sign_in_settings.py b/saasus_sdk_python/src/auth/models/sign_in_settings.py new file mode 100644 index 0000000..1467108 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/sign_in_settings.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +class SignInSettings(BaseModel): + """ + SignInSettings + """ + password_policy: PasswordPolicy = Field(...) + device_configuration: DeviceConfiguration = Field(...) + mfa_configuration: MfaConfiguration = Field(...) + recaptcha_props: RecaptchaProps = Field(...) + account_verification: AccountVerification = Field(...) + self_regist: SelfRegist = Field(...) + identity_provider_configuration: IdentityProviderConfiguration = Field(...) + __properties = ["password_policy", "device_configuration", "mfa_configuration", "recaptcha_props", "account_verification", "self_regist", "identity_provider_configuration"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SignInSettings: + """Create an instance of SignInSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of password_policy + if self.password_policy: + _dict['password_policy'] = self.password_policy.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_configuration + if self.device_configuration: + _dict['device_configuration'] = self.device_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfa_configuration + if self.mfa_configuration: + _dict['mfa_configuration'] = self.mfa_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of recaptcha_props + if self.recaptcha_props: + _dict['recaptcha_props'] = self.recaptcha_props.to_dict() + # override the default output from pydantic by calling `to_dict()` of account_verification + if self.account_verification: + _dict['account_verification'] = self.account_verification.to_dict() + # override the default output from pydantic by calling `to_dict()` of self_regist + if self.self_regist: + _dict['self_regist'] = self.self_regist.to_dict() + # override the default output from pydantic by calling `to_dict()` of identity_provider_configuration + if self.identity_provider_configuration: + _dict['identity_provider_configuration'] = self.identity_provider_configuration.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SignInSettings: + """Create an instance of SignInSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SignInSettings.parse_obj(obj) + + _obj = SignInSettings.parse_obj({ + "password_policy": PasswordPolicy.from_dict(obj.get("password_policy")) if obj.get("password_policy") is not None else None, + "device_configuration": DeviceConfiguration.from_dict(obj.get("device_configuration")) if obj.get("device_configuration") is not None else None, + "mfa_configuration": MfaConfiguration.from_dict(obj.get("mfa_configuration")) if obj.get("mfa_configuration") is not None else None, + "recaptcha_props": RecaptchaProps.from_dict(obj.get("recaptcha_props")) if obj.get("recaptcha_props") is not None else None, + "account_verification": AccountVerification.from_dict(obj.get("account_verification")) if obj.get("account_verification") is not None else None, + "self_regist": SelfRegist.from_dict(obj.get("self_regist")) if obj.get("self_regist") is not None else None, + "identity_provider_configuration": IdentityProviderConfiguration.from_dict(obj.get("identity_provider_configuration")) if obj.get("identity_provider_configuration") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/sign_up_param.py b/saasus_sdk_python/src/auth/models/sign_up_param.py new file mode 100644 index 0000000..4ee144f --- /dev/null +++ b/saasus_sdk_python/src/auth/models/sign_up_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SignUpParam(BaseModel): + """ + SignUpParam + """ + email: StrictStr = Field(..., description="Email Address") + __properties = ["email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SignUpParam: + """Create an instance of SignUpParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SignUpParam: + """Create an instance of SignUpParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SignUpParam.parse_obj(obj) + + _obj = SignUpParam.parse_obj({ + "email": obj.get("email") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/sign_up_with_aws_marketplace_param.py b/saasus_sdk_python/src/auth/models/sign_up_with_aws_marketplace_param.py new file mode 100644 index 0000000..8a3a043 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/sign_up_with_aws_marketplace_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SignUpWithAwsMarketplaceParam(BaseModel): + """ + SignUpWithAwsMarketplaceParam + """ + email: StrictStr = Field(..., description="Email Address") + registration_token: StrictStr = Field(..., description="Registration Token") + __properties = ["email", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SignUpWithAwsMarketplaceParam: + """Create an instance of SignUpWithAwsMarketplaceParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SignUpWithAwsMarketplaceParam: + """Create an instance of SignUpWithAwsMarketplaceParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SignUpWithAwsMarketplaceParam.parse_obj(obj) + + _obj = SignUpWithAwsMarketplaceParam.parse_obj({ + "email": obj.get("email"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/single_tenant_settings.py b/saasus_sdk_python/src/auth/models/single_tenant_settings.py new file mode 100644 index 0000000..55cc6cb --- /dev/null +++ b/saasus_sdk_python/src/auth/models/single_tenant_settings.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class SingleTenantSettings(BaseModel): + """ + SingleTenantSettings + """ + enabled: StrictBool = Field(..., description="enable Single Tenant settings or not") + role_arn: StrictStr = Field(..., description="ARN of the role for SaaS Platform to AssumeRole") + cloudformation_template_url: StrictStr = Field(..., description="S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored") + ddl_template_url: StrictStr = Field(..., description="S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored") + role_external_id: StrictStr = Field(..., description="External id used by SaaSus when AssumeRole to operate SaaS") + __properties = ["enabled", "role_arn", "cloudformation_template_url", "ddl_template_url", "role_external_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SingleTenantSettings: + """Create an instance of SingleTenantSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SingleTenantSettings: + """Create an instance of SingleTenantSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SingleTenantSettings.parse_obj(obj) + + _obj = SingleTenantSettings.parse_obj({ + "enabled": obj.get("enabled"), + "role_arn": obj.get("role_arn"), + "cloudformation_template_url": obj.get("cloudformation_template_url"), + "ddl_template_url": obj.get("ddl_template_url"), + "role_external_id": obj.get("role_external_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/software_token_secret_code.py b/saasus_sdk_python/src/auth/models/software_token_secret_code.py new file mode 100644 index 0000000..0098225 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/software_token_secret_code.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SoftwareTokenSecretCode(BaseModel): + """ + SoftwareTokenSecretCode + """ + secret_code: StrictStr = Field(..., description="secret code") + __properties = ["secret_code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SoftwareTokenSecretCode: + """Create an instance of SoftwareTokenSecretCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SoftwareTokenSecretCode: + """Create an instance of SoftwareTokenSecretCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SoftwareTokenSecretCode.parse_obj(obj) + + _obj = SoftwareTokenSecretCode.parse_obj({ + "secret_code": obj.get("secret_code") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/stripe_customer.py b/saasus_sdk_python/src/auth/models/stripe_customer.py new file mode 100644 index 0000000..85f6f1c --- /dev/null +++ b/saasus_sdk_python/src/auth/models/stripe_customer.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class StripeCustomer(BaseModel): + """ + StripeCustomer + """ + customer_id: StrictStr = Field(..., description="stripe Customer ID") + subscription_schedule_id: StrictStr = Field(..., description="stripe Subscription Schedule ID") + __properties = ["customer_id", "subscription_schedule_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StripeCustomer: + """Create an instance of StripeCustomer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StripeCustomer: + """Create an instance of StripeCustomer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StripeCustomer.parse_obj(obj) + + _obj = StripeCustomer.parse_obj({ + "customer_id": obj.get("customer_id"), + "subscription_schedule_id": obj.get("subscription_schedule_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenant.py b/saasus_sdk_python/src/auth/models/tenant.py new file mode 100644 index 0000000..8590aae --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from typing_extensions import Annotated + +class Tenant(BaseModel): + """ + Tenant + """ + name: StrictStr = Field(..., description="tenant name") + attributes: Dict[str, Any] = Field(..., description="attribute info") + back_office_staff_email: StrictStr = Field(..., description="administrative staff email address") + next_plan_id: Optional[StrictStr] = None + using_next_plan_from: Optional[StrictInt] = Field(None, description="Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) ") + next_plan_tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + plan_histories: Annotated[List[PlanHistory], Field()] = Field(..., description="Plan History") + id: StrictStr = Field(...) + plan_id: Optional[StrictStr] = None + billing_info: Optional[BillingInfo] = None + __properties = ["name", "attributes", "back_office_staff_email", "next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "proration_behavior", "delete_usage", "plan_histories", "id", "plan_id", "billing_info"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Tenant: + """Create an instance of Tenant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) + _items = [] + if self.plan_histories: + for _item in self.plan_histories: + if _item: + _items.append(_item.to_dict()) + _dict['plan_histories'] = _items + # override the default output from pydantic by calling `to_dict()` of billing_info + if self.billing_info: + _dict['billing_info'] = self.billing_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Tenant: + """Create an instance of Tenant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Tenant.parse_obj(obj) + + _obj = Tenant.parse_obj({ + "name": obj.get("name"), + "attributes": obj.get("attributes"), + "back_office_staff_email": obj.get("back_office_staff_email"), + "next_plan_id": obj.get("next_plan_id"), + "using_next_plan_from": obj.get("using_next_plan_from"), + "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage"), + "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None, + "id": obj.get("id"), + "plan_id": obj.get("plan_id"), + "billing_info": BillingInfo.from_dict(obj.get("billing_info")) if obj.get("billing_info") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenant_attributes.py b/saasus_sdk_python/src/auth/models/tenant_attributes.py new file mode 100644 index 0000000..4c0b843 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant_attributes.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.attribute import Attribute +from typing_extensions import Annotated + +class TenantAttributes(BaseModel): + """ + TenantAttributes + """ + tenant_attributes: Annotated[List[Attribute], Field()] = Field(..., description="Tenant Attribute Definition") + __properties = ["tenant_attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantAttributes: + """Create an instance of TenantAttributes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tenant_attributes (list) + _items = [] + if self.tenant_attributes: + for _item in self.tenant_attributes: + if _item: + _items.append(_item.to_dict()) + _dict['tenant_attributes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantAttributes: + """Create an instance of TenantAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantAttributes.parse_obj(obj) + + _obj = TenantAttributes.parse_obj({ + "tenant_attributes": [Attribute.from_dict(_item) for _item in obj.get("tenant_attributes")] if obj.get("tenant_attributes") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenant_detail.py b/saasus_sdk_python/src/auth/models/tenant_detail.py new file mode 100644 index 0000000..91b1a0d --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant_detail.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from typing_extensions import Annotated + +class TenantDetail(BaseModel): + """ + TenantDetail + """ + id: StrictStr = Field(...) + plan_id: Optional[StrictStr] = None + billing_info: Optional[BillingInfo] = None + name: StrictStr = Field(..., description="tenant name") + attributes: Dict[str, Any] = Field(..., description="attribute info") + back_office_staff_email: StrictStr = Field(..., description="administrative staff email address") + next_plan_id: Optional[StrictStr] = None + using_next_plan_from: Optional[StrictInt] = Field(None, description="Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) ") + next_plan_tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + plan_histories: Annotated[List[PlanHistory], Field()] = Field(..., description="Plan History") + current_plan_period_start: Optional[StrictInt] = Field(None, description="current plan period start") + current_plan_period_end: Optional[StrictInt] = Field(None, description="current plan period end") + __properties = ["id", "plan_id", "billing_info", "name", "attributes", "back_office_staff_email", "next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "proration_behavior", "delete_usage", "plan_histories", "current_plan_period_start", "current_plan_period_end"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantDetail: + """Create an instance of TenantDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of billing_info + if self.billing_info: + _dict['billing_info'] = self.billing_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) + _items = [] + if self.plan_histories: + for _item in self.plan_histories: + if _item: + _items.append(_item.to_dict()) + _dict['plan_histories'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantDetail: + """Create an instance of TenantDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantDetail.parse_obj(obj) + + _obj = TenantDetail.parse_obj({ + "id": obj.get("id"), + "plan_id": obj.get("plan_id"), + "billing_info": BillingInfo.from_dict(obj.get("billing_info")) if obj.get("billing_info") is not None else None, + "name": obj.get("name"), + "attributes": obj.get("attributes"), + "back_office_staff_email": obj.get("back_office_staff_email"), + "next_plan_id": obj.get("next_plan_id"), + "using_next_plan_from": obj.get("using_next_plan_from"), + "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage"), + "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None, + "current_plan_period_start": obj.get("current_plan_period_start"), + "current_plan_period_end": obj.get("current_plan_period_end") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenant_identity_provider_props.py b/saasus_sdk_python/src/auth/models/tenant_identity_provider_props.py new file mode 100644 index 0000000..a582593 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant_identity_provider_props.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Literal, Any, List, Optional +from pydantic import field_validator, ConfigDict, BaseModel, StrictStr, ValidationError +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr + +TENANTIDENTITYPROVIDERPROPS_ONE_OF_SCHEMAS = ["IdentityProviderSaml"] + +class TenantIdentityProviderProps(BaseModel): + """ + TenantIdentityProviderProps + """ + # data type: IdentityProviderSaml + oneof_schema_1_validator: Optional[IdentityProviderSaml] = None + if TYPE_CHECKING: + actual_instance: Union[IdentityProviderSaml] + else: + actual_instance: Any = None + one_of_schemas: Literal[TENANTIDENTITYPROVIDERPROPS_ONE_OF_SCHEMAS] = TENANTIDENTITYPROVIDERPROPS_ONE_OF_SCHEMAS + model_config = ConfigDict(validate_assignment=True) + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + @classmethod + def actual_instance_must_validate_oneof(cls, v): + instance = TenantIdentityProviderProps.construct() + error_messages = [] + match = 0 + # validate data type: IdentityProviderSaml + if not isinstance(v, IdentityProviderSaml): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdentityProviderSaml`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> TenantIdentityProviderProps: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> TenantIdentityProviderProps: + """Returns the object represented by the json string""" + instance = TenantIdentityProviderProps.construct() + error_messages = [] + match = 0 + + # deserialize data into IdentityProviderSaml + try: + instance.actual_instance = IdentityProviderSaml.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/saasus_sdk_python/src/auth/models/tenant_identity_providers.py b/saasus_sdk_python/src/auth/models/tenant_identity_providers.py new file mode 100644 index 0000000..d074875 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant_identity_providers.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +class TenantIdentityProviders(BaseModel): + """ + TenantIdentityProviders + """ + saml: Optional[TenantIdentityProvidersSaml] = None + __properties = ["saml"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantIdentityProviders: + """Create an instance of TenantIdentityProviders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantIdentityProviders: + """Create an instance of TenantIdentityProviders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantIdentityProviders.parse_obj(obj) + + _obj = TenantIdentityProviders.parse_obj({ + "saml": TenantIdentityProvidersSaml.from_dict(obj.get("saml")) if obj.get("saml") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenant_identity_providers_saml.py b/saasus_sdk_python/src/auth/models/tenant_identity_providers_saml.py new file mode 100644 index 0000000..6fac247 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant_identity_providers_saml.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class TenantIdentityProvidersSaml(BaseModel): + """ + TenantIdentityProvidersSaml + """ + metadata_url: StrictStr = Field(...) + email_attribute: StrictStr = Field(...) + sign_in_url: StrictStr = Field(...) + __properties = ["metadata_url", "email_attribute", "sign_in_url"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantIdentityProvidersSaml: + """Create an instance of TenantIdentityProvidersSaml from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantIdentityProvidersSaml: + """Create an instance of TenantIdentityProvidersSaml from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantIdentityProvidersSaml.parse_obj(obj) + + _obj = TenantIdentityProvidersSaml.parse_obj({ + "metadata_url": obj.get("metadata_url"), + "email_attribute": obj.get("email_attribute"), + "sign_in_url": obj.get("sign_in_url") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenant_props.py b/saasus_sdk_python/src/auth/models/tenant_props.py new file mode 100644 index 0000000..540e3ad --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenant_props.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class TenantProps(BaseModel): + """ + TenantProps + """ + name: StrictStr = Field(..., description="tenant name") + attributes: Dict[str, Any] = Field(..., description="attribute info") + back_office_staff_email: StrictStr = Field(..., description="administrative staff email address") + __properties = ["name", "attributes", "back_office_staff_email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantProps: + """Create an instance of TenantProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantProps: + """Create an instance of TenantProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantProps.parse_obj(obj) + + _obj = TenantProps.parse_obj({ + "name": obj.get("name"), + "attributes": obj.get("attributes"), + "back_office_staff_email": obj.get("back_office_staff_email") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/tenants.py b/saasus_sdk_python/src/auth/models/tenants.py new file mode 100644 index 0000000..a434f7d --- /dev/null +++ b/saasus_sdk_python/src/auth/models/tenants.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.tenant import Tenant +from typing_extensions import Annotated + +class Tenants(BaseModel): + """ + Tenant Info + """ + tenants: Annotated[List[Tenant], Field()] = Field(...) + __properties = ["tenants"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Tenants: + """Create an instance of Tenants from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) + _items = [] + if self.tenants: + for _item in self.tenants: + if _item: + _items.append(_item.to_dict()) + _dict['tenants'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Tenants: + """Create an instance of Tenants from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Tenants.parse_obj(obj) + + _obj = Tenants.parse_obj({ + "tenants": [Tenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_basic_info_param.py b/saasus_sdk_python/src/auth/models/update_basic_info_param.py new file mode 100644 index 0000000..816cdf0 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_basic_info_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class UpdateBasicInfoParam(BaseModel): + """ + UpdateBasicInfoParam + """ + domain_name: StrictStr = Field(..., description="Domain Name") + from_email_address: StrictStr = Field(..., description="Sender email of authentication email") + reply_email_address: Optional[StrictStr] = Field(None, description="Reply-from email address of authentication email") + __properties = ["domain_name", "from_email_address", "reply_email_address"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateBasicInfoParam: + """Create an instance of UpdateBasicInfoParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateBasicInfoParam: + """Create an instance of UpdateBasicInfoParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateBasicInfoParam.parse_obj(obj) + + _obj = UpdateBasicInfoParam.parse_obj({ + "domain_name": obj.get("domain_name"), + "from_email_address": obj.get("from_email_address"), + "reply_email_address": obj.get("reply_email_address") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_customize_page_settings_param.py b/saasus_sdk_python/src/auth/models/update_customize_page_settings_param.py new file mode 100644 index 0000000..0452a92 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_customize_page_settings_param.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateCustomizePageSettingsParam(BaseModel): + """ + UpdateCustomizePageSettingsParam + """ + title: StrictStr = Field(..., description="service name") + terms_of_service_url: StrictStr = Field(..., description="terms of service URL") + privacy_policy_url: StrictStr = Field(..., description="privacy policy URL") + google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager container ID") + icon: StrictStr = Field(..., description="service icon") + favicon: StrictStr = Field(..., description="favicon") + __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id", "icon", "favicon"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateCustomizePageSettingsParam: + """Create an instance of UpdateCustomizePageSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateCustomizePageSettingsParam: + """Create an instance of UpdateCustomizePageSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateCustomizePageSettingsParam.parse_obj(obj) + + _obj = UpdateCustomizePageSettingsParam.parse_obj({ + "title": obj.get("title"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "google_tag_manager_container_id": obj.get("google_tag_manager_container_id"), + "icon": obj.get("icon"), + "favicon": obj.get("favicon") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_customize_pages_param.py b/saasus_sdk_python/src/auth/models/update_customize_pages_param.py new file mode 100644 index 0000000..867c191 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_customize_pages_param.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +class UpdateCustomizePagesParam(BaseModel): + """ + UpdateCustomizePagesParam + """ + sign_up_page: Optional[CustomizePageProps] = None + sign_in_page: Optional[CustomizePageProps] = None + password_reset_page: Optional[CustomizePageProps] = None + __properties = ["sign_up_page", "sign_in_page", "password_reset_page"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateCustomizePagesParam: + """Create an instance of UpdateCustomizePagesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up_page + if self.sign_up_page: + _dict['sign_up_page'] = self.sign_up_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of sign_in_page + if self.sign_in_page: + _dict['sign_in_page'] = self.sign_in_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of password_reset_page + if self.password_reset_page: + _dict['password_reset_page'] = self.password_reset_page.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateCustomizePagesParam: + """Create an instance of UpdateCustomizePagesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateCustomizePagesParam.parse_obj(obj) + + _obj = UpdateCustomizePagesParam.parse_obj({ + "sign_up_page": CustomizePageProps.from_dict(obj.get("sign_up_page")) if obj.get("sign_up_page") is not None else None, + "sign_in_page": CustomizePageProps.from_dict(obj.get("sign_in_page")) if obj.get("sign_in_page") is not None else None, + "password_reset_page": CustomizePageProps.from_dict(obj.get("password_reset_page")) if obj.get("password_reset_page") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_env_param.py b/saasus_sdk_python/src/auth/models/update_env_param.py new file mode 100644 index 0000000..861ddc7 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_env_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class UpdateEnvParam(BaseModel): + """ + UpdateEnvParam + """ + name: StrictStr = Field(..., description="env name") + display_name: Optional[StrictStr] = Field(None, description="env display name") + __properties = ["name", "display_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateEnvParam: + """Create an instance of UpdateEnvParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateEnvParam: + """Create an instance of UpdateEnvParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateEnvParam.parse_obj(obj) + + _obj = UpdateEnvParam.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_identity_provider_param.py b/saasus_sdk_python/src/auth/models/update_identity_provider_param.py new file mode 100644 index 0000000..cf0857f --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_identity_provider_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps +from saasus_sdk_python.src.auth.models.provider_name import ProviderName + +class UpdateIdentityProviderParam(BaseModel): + """ + UpdateIdentityProviderParam + """ + provider: ProviderName = Field(...) + identity_provider_props: Optional[IdentityProviderProps] = None + __properties = ["provider", "identity_provider_props"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateIdentityProviderParam: + """Create an instance of UpdateIdentityProviderParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of identity_provider_props + if self.identity_provider_props: + _dict['identity_provider_props'] = self.identity_provider_props.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateIdentityProviderParam: + """Create an instance of UpdateIdentityProviderParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateIdentityProviderParam.parse_obj(obj) + + _obj = UpdateIdentityProviderParam.parse_obj({ + "provider": obj.get("provider"), + "identity_provider_props": IdentityProviderProps.from_dict(obj.get("identity_provider_props")) if obj.get("identity_provider_props") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_notification_messages_param.py b/saasus_sdk_python/src/auth/models/update_notification_messages_param.py new file mode 100644 index 0000000..32d3a4d --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_notification_messages_param.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +class UpdateNotificationMessagesParam(BaseModel): + """ + UpdateNotificationMessagesParam + """ + sign_up: Optional[MessageTemplate] = None + create_user: Optional[MessageTemplate] = None + resend_code: Optional[MessageTemplate] = None + forgot_password: Optional[MessageTemplate] = None + update_user_attribute: Optional[MessageTemplate] = None + verify_user_attribute: Optional[MessageTemplate] = None + authentication_mfa: Optional[MessageTemplate] = None + invite_tenant_user: Optional[MessageTemplate] = None + verify_external_user: Optional[MessageTemplate] = None + __properties = ["sign_up", "create_user", "resend_code", "forgot_password", "update_user_attribute", "verify_user_attribute", "authentication_mfa", "invite_tenant_user", "verify_external_user"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateNotificationMessagesParam: + """Create an instance of UpdateNotificationMessagesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up + if self.sign_up: + _dict['sign_up'] = self.sign_up.to_dict() + # override the default output from pydantic by calling `to_dict()` of create_user + if self.create_user: + _dict['create_user'] = self.create_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of resend_code + if self.resend_code: + _dict['resend_code'] = self.resend_code.to_dict() + # override the default output from pydantic by calling `to_dict()` of forgot_password + if self.forgot_password: + _dict['forgot_password'] = self.forgot_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of update_user_attribute + if self.update_user_attribute: + _dict['update_user_attribute'] = self.update_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_user_attribute + if self.verify_user_attribute: + _dict['verify_user_attribute'] = self.verify_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of authentication_mfa + if self.authentication_mfa: + _dict['authentication_mfa'] = self.authentication_mfa.to_dict() + # override the default output from pydantic by calling `to_dict()` of invite_tenant_user + if self.invite_tenant_user: + _dict['invite_tenant_user'] = self.invite_tenant_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_external_user + if self.verify_external_user: + _dict['verify_external_user'] = self.verify_external_user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateNotificationMessagesParam: + """Create an instance of UpdateNotificationMessagesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateNotificationMessagesParam.parse_obj(obj) + + _obj = UpdateNotificationMessagesParam.parse_obj({ + "sign_up": MessageTemplate.from_dict(obj.get("sign_up")) if obj.get("sign_up") is not None else None, + "create_user": MessageTemplate.from_dict(obj.get("create_user")) if obj.get("create_user") is not None else None, + "resend_code": MessageTemplate.from_dict(obj.get("resend_code")) if obj.get("resend_code") is not None else None, + "forgot_password": MessageTemplate.from_dict(obj.get("forgot_password")) if obj.get("forgot_password") is not None else None, + "update_user_attribute": MessageTemplate.from_dict(obj.get("update_user_attribute")) if obj.get("update_user_attribute") is not None else None, + "verify_user_attribute": MessageTemplate.from_dict(obj.get("verify_user_attribute")) if obj.get("verify_user_attribute") is not None else None, + "authentication_mfa": MessageTemplate.from_dict(obj.get("authentication_mfa")) if obj.get("authentication_mfa") is not None else None, + "invite_tenant_user": MessageTemplate.from_dict(obj.get("invite_tenant_user")) if obj.get("invite_tenant_user") is not None else None, + "verify_external_user": MessageTemplate.from_dict(obj.get("verify_external_user")) if obj.get("verify_external_user") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_saas_user_attributes_param.py b/saasus_sdk_python/src/auth/models/update_saas_user_attributes_param.py new file mode 100644 index 0000000..ddc9690 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_saas_user_attributes_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field + +class UpdateSaasUserAttributesParam(BaseModel): + """ + UpdateSaasUserAttributesParam + """ + attributes: Dict[str, Any] = Field(..., description="Attribute information ") + __properties = ["attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSaasUserAttributesParam: + """Create an instance of UpdateSaasUserAttributesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSaasUserAttributesParam: + """Create an instance of UpdateSaasUserAttributesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSaasUserAttributesParam.parse_obj(obj) + + _obj = UpdateSaasUserAttributesParam.parse_obj({ + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_saas_user_email_param.py b/saasus_sdk_python/src/auth/models/update_saas_user_email_param.py new file mode 100644 index 0000000..346bf57 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_saas_user_email_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateSaasUserEmailParam(BaseModel): + """ + UpdateSaasUserEmailParam + """ + email: StrictStr = Field(..., description="E-mail") + __properties = ["email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSaasUserEmailParam: + """Create an instance of UpdateSaasUserEmailParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSaasUserEmailParam: + """Create an instance of UpdateSaasUserEmailParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSaasUserEmailParam.parse_obj(obj) + + _obj = UpdateSaasUserEmailParam.parse_obj({ + "email": obj.get("email") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_saas_user_password_param.py b/saasus_sdk_python/src/auth/models/update_saas_user_password_param.py new file mode 100644 index 0000000..cb17e5a --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_saas_user_password_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateSaasUserPasswordParam(BaseModel): + """ + UpdateSaasUserPasswordParam + """ + password: StrictStr = Field(..., description="Password") + __properties = ["password"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSaasUserPasswordParam: + """Create an instance of UpdateSaasUserPasswordParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSaasUserPasswordParam: + """Create an instance of UpdateSaasUserPasswordParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSaasUserPasswordParam.parse_obj(obj) + + _obj = UpdateSaasUserPasswordParam.parse_obj({ + "password": obj.get("password") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_sign_in_settings_param.py b/saasus_sdk_python/src/auth/models/update_sign_in_settings_param.py new file mode 100644 index 0000000..5b96a41 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_sign_in_settings_param.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +class UpdateSignInSettingsParam(BaseModel): + """ + UpdateSignInSettingsParam + """ + password_policy: Optional[PasswordPolicy] = None + device_configuration: Optional[DeviceConfiguration] = None + mfa_configuration: Optional[MfaConfiguration] = None + recaptcha_props: Optional[RecaptchaProps] = None + account_verification: Optional[AccountVerification] = None + self_regist: Optional[SelfRegist] = None + __properties = ["password_policy", "device_configuration", "mfa_configuration", "recaptcha_props", "account_verification", "self_regist"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSignInSettingsParam: + """Create an instance of UpdateSignInSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of password_policy + if self.password_policy: + _dict['password_policy'] = self.password_policy.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_configuration + if self.device_configuration: + _dict['device_configuration'] = self.device_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfa_configuration + if self.mfa_configuration: + _dict['mfa_configuration'] = self.mfa_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of recaptcha_props + if self.recaptcha_props: + _dict['recaptcha_props'] = self.recaptcha_props.to_dict() + # override the default output from pydantic by calling `to_dict()` of account_verification + if self.account_verification: + _dict['account_verification'] = self.account_verification.to_dict() + # override the default output from pydantic by calling `to_dict()` of self_regist + if self.self_regist: + _dict['self_regist'] = self.self_regist.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSignInSettingsParam: + """Create an instance of UpdateSignInSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSignInSettingsParam.parse_obj(obj) + + _obj = UpdateSignInSettingsParam.parse_obj({ + "password_policy": PasswordPolicy.from_dict(obj.get("password_policy")) if obj.get("password_policy") is not None else None, + "device_configuration": DeviceConfiguration.from_dict(obj.get("device_configuration")) if obj.get("device_configuration") is not None else None, + "mfa_configuration": MfaConfiguration.from_dict(obj.get("mfa_configuration")) if obj.get("mfa_configuration") is not None else None, + "recaptcha_props": RecaptchaProps.from_dict(obj.get("recaptcha_props")) if obj.get("recaptcha_props") is not None else None, + "account_verification": AccountVerification.from_dict(obj.get("account_verification")) if obj.get("account_verification") is not None else None, + "self_regist": SelfRegist.from_dict(obj.get("self_regist")) if obj.get("self_regist") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_single_tenant_settings_param.py b/saasus_sdk_python/src/auth/models/update_single_tenant_settings_param.py new file mode 100644 index 0000000..c43850b --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_single_tenant_settings_param.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class UpdateSingleTenantSettingsParam(BaseModel): + """ + UpdateSingleTenantSettingsParam + """ + enabled: Optional[StrictBool] = Field(None, description="enable Single Tenant settings or not") + role_arn: Optional[StrictStr] = Field(None, description="ARN of the role for SaaS Platform to AssumeRole") + cloudformation_template: Optional[StrictStr] = Field(None, description="CloudFormation template file") + ddl_template: Optional[StrictStr] = Field(None, description="ddl file to run in SaaS environment") + role_external_id: Optional[StrictStr] = Field(None, description="External id used by SaaSus when AssumeRole to operate SaaS") + __properties = ["enabled", "role_arn", "cloudformation_template", "ddl_template", "role_external_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSingleTenantSettingsParam: + """Create an instance of UpdateSingleTenantSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSingleTenantSettingsParam: + """Create an instance of UpdateSingleTenantSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSingleTenantSettingsParam.parse_obj(obj) + + _obj = UpdateSingleTenantSettingsParam.parse_obj({ + "enabled": obj.get("enabled"), + "role_arn": obj.get("role_arn"), + "cloudformation_template": obj.get("cloudformation_template"), + "ddl_template": obj.get("ddl_template"), + "role_external_id": obj.get("role_external_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_software_token_param.py b/saasus_sdk_python/src/auth/models/update_software_token_param.py new file mode 100644 index 0000000..f699113 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_software_token_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateSoftwareTokenParam(BaseModel): + """ + UpdateSoftwareTokenParam + """ + access_token: StrictStr = Field(..., description="access token") + verification_code: StrictStr = Field(..., description="verification code") + __properties = ["access_token", "verification_code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSoftwareTokenParam: + """Create an instance of UpdateSoftwareTokenParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSoftwareTokenParam: + """Create an instance of UpdateSoftwareTokenParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSoftwareTokenParam.parse_obj(obj) + + _obj = UpdateSoftwareTokenParam.parse_obj({ + "access_token": obj.get("access_token"), + "verification_code": obj.get("verification_code") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_tenant_identity_provider_param.py b/saasus_sdk_python/src/auth/models/update_tenant_identity_provider_param.py new file mode 100644 index 0000000..e6d624f --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_tenant_identity_provider_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.provider_type import ProviderType +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +class UpdateTenantIdentityProviderParam(BaseModel): + """ + If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + """ + provider_type: ProviderType = Field(...) + identity_provider_props: Optional[TenantIdentityProviderProps] = None + __properties = ["provider_type", "identity_provider_props"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateTenantIdentityProviderParam: + """Create an instance of UpdateTenantIdentityProviderParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of identity_provider_props + if self.identity_provider_props: + _dict['identity_provider_props'] = self.identity_provider_props.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateTenantIdentityProviderParam: + """Create an instance of UpdateTenantIdentityProviderParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateTenantIdentityProviderParam.parse_obj(obj) + + _obj = UpdateTenantIdentityProviderParam.parse_obj({ + "provider_type": obj.get("provider_type"), + "identity_provider_props": TenantIdentityProviderProps.from_dict(obj.get("identity_provider_props")) if obj.get("identity_provider_props") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/update_tenant_user_param.py b/saasus_sdk_python/src/auth/models/update_tenant_user_param.py new file mode 100644 index 0000000..7864b5d --- /dev/null +++ b/saasus_sdk_python/src/auth/models/update_tenant_user_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field + +class UpdateTenantUserParam(BaseModel): + """ + UpdateTenantUserParam + """ + attributes: Dict[str, Any] = Field(..., description="Attribute information (Get information set by defining user attributes in the SaaS development console) ") + __properties = ["attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateTenantUserParam: + """Create an instance of UpdateTenantUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateTenantUserParam: + """Create an instance of UpdateTenantUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateTenantUserParam.parse_obj(obj) + + _obj = UpdateTenantUserParam.parse_obj({ + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/user.py b/saasus_sdk_python/src/auth/models/user.py new file mode 100644 index 0000000..28576a8 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/user.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from typing_extensions import Annotated + +class User(BaseModel): + """ + User + """ + id: StrictStr = Field(..., description="User ID") + tenant_id: StrictStr = Field(...) + tenant_name: StrictStr = Field(..., description="Tenant Name") + email: StrictStr = Field(..., description="E-mail") + attributes: Dict[str, Any] = Field(..., description="Attribute information (Get information set by defining user attributes in the SaaS development console) ") + envs: Annotated[List[UserAvailableEnv], Field()] = Field(...) + __properties = ["id", "tenant_id", "tenant_name", "email", "attributes", "envs"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> User: + """Create an instance of User from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> User: + """Create an instance of User from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return User.parse_obj(obj) + + _obj = User.parse_obj({ + "id": obj.get("id"), + "tenant_id": obj.get("tenant_id"), + "tenant_name": obj.get("tenant_name"), + "email": obj.get("email"), + "attributes": obj.get("attributes"), + "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/user_attributes.py b/saasus_sdk_python/src/auth/models/user_attributes.py new file mode 100644 index 0000000..d24c2ec --- /dev/null +++ b/saasus_sdk_python/src/auth/models/user_attributes.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.attribute import Attribute +from typing_extensions import Annotated + +class UserAttributes(BaseModel): + """ + UserAttributes + """ + user_attributes: Annotated[List[Attribute], Field()] = Field(..., description="User Attribute Definition") + __properties = ["user_attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserAttributes: + """Create an instance of UserAttributes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in user_attributes (list) + _items = [] + if self.user_attributes: + for _item in self.user_attributes: + if _item: + _items.append(_item.to_dict()) + _dict['user_attributes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAttributes: + """Create an instance of UserAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserAttributes.parse_obj(obj) + + _obj = UserAttributes.parse_obj({ + "user_attributes": [Attribute.from_dict(_item) for _item in obj.get("user_attributes")] if obj.get("user_attributes") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/user_available_env.py b/saasus_sdk_python/src/auth/models/user_available_env.py new file mode 100644 index 0000000..04cc076 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/user_available_env.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.role import Role +from typing_extensions import Annotated + +class UserAvailableEnv(BaseModel): + """ + UserAvailableEnv + """ + id: StrictInt = Field(...) + name: StrictStr = Field(..., description="env name") + display_name: Optional[StrictStr] = Field(None, description="env display name") + roles: Annotated[List[Role], Field()] = Field(..., description="role info") + __properties = ["id", "name", "display_name", "roles"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserAvailableEnv: + """Create an instance of UserAvailableEnv from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAvailableEnv: + """Create an instance of UserAvailableEnv from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserAvailableEnv.parse_obj(obj) + + _obj = UserAvailableEnv.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/user_available_tenant.py b/saasus_sdk_python/src/auth/models/user_available_tenant.py new file mode 100644 index 0000000..8ab5e3d --- /dev/null +++ b/saasus_sdk_python/src/auth/models/user_available_tenant.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from typing_extensions import Annotated + +class UserAvailableTenant(BaseModel): + """ + UserAvailableTenant + """ + id: StrictStr = Field(...) + name: StrictStr = Field(..., description="Tenant Name") + completed_sign_up: StrictBool = Field(...) + envs: Annotated[List[UserAvailableEnv], Field()] = Field(..., description="environmental info, role info") + user_attribute: Dict[str, Any] = Field(..., description="user additional attributes") + back_office_staff_email: StrictStr = Field(..., description="back office contact email") + plan_id: Optional[StrictStr] = None + is_paid: Optional[StrictBool] = Field(None, description="tenant payment status ※ Currently, it is returned only when stripe is linked. ") + __properties = ["id", "name", "completed_sign_up", "envs", "user_attribute", "back_office_staff_email", "plan_id", "is_paid"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserAvailableTenant: + """Create an instance of UserAvailableTenant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAvailableTenant: + """Create an instance of UserAvailableTenant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserAvailableTenant.parse_obj(obj) + + _obj = UserAvailableTenant.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "completed_sign_up": obj.get("completed_sign_up"), + "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None, + "user_attribute": obj.get("user_attribute"), + "back_office_staff_email": obj.get("back_office_staff_email"), + "plan_id": obj.get("plan_id"), + "is_paid": obj.get("is_paid") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/user_info.py b/saasus_sdk_python/src/auth/models/user_info.py new file mode 100644 index 0000000..4b8bf36 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/user_info.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant +from typing_extensions import Annotated + +class UserInfo(BaseModel): + """ + UserInfo + """ + id: StrictStr = Field(...) + email: StrictStr = Field(..., description="E-mail") + user_attribute: Dict[str, Any] = Field(..., description="user additional attributes") + tenants: Annotated[List[UserAvailableTenant], Field()] = Field(..., description="Tenant Info") + __properties = ["id", "email", "user_attribute", "tenants"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserInfo: + """Create an instance of UserInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) + _items = [] + if self.tenants: + for _item in self.tenants: + if _item: + _items.append(_item.to_dict()) + _dict['tenants'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserInfo: + """Create an instance of UserInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserInfo.parse_obj(obj) + + _obj = UserInfo.parse_obj({ + "id": obj.get("id"), + "email": obj.get("email"), + "user_attribute": obj.get("user_attribute"), + "tenants": [UserAvailableTenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/users.py b/saasus_sdk_python/src/auth/models/users.py new file mode 100644 index 0000000..f8c5772 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/users.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.user import User +from typing_extensions import Annotated + +class Users(BaseModel): + """ + Users + """ + users: Annotated[List[User], Field()] = Field(...) + __properties = ["users"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Users: + """Create an instance of Users from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Users: + """Create an instance of Users from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Users.parse_obj(obj) + + _obj = Users.parse_obj({ + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/models/validate_invitation_param.py b/saasus_sdk_python/src/auth/models/validate_invitation_param.py new file mode 100644 index 0000000..7bce826 --- /dev/null +++ b/saasus_sdk_python/src/auth/models/validate_invitation_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class ValidateInvitationParam(BaseModel): + """ + Access token is required for existing users, and email and password is required for new users. + """ + access_token: Optional[StrictStr] = Field(None, description="Access token of the invited user") + email: Optional[StrictStr] = Field(None, description="Email address of the invited user") + password: Optional[StrictStr] = Field(None, description="Password of the invited user") + __properties = ["access_token", "email", "password"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ValidateInvitationParam: + """Create an instance of ValidateInvitationParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ValidateInvitationParam: + """Create an instance of ValidateInvitationParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ValidateInvitationParam.parse_obj(obj) + + _obj = ValidateInvitationParam.parse_obj({ + "access_token": obj.get("access_token"), + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/saasus_sdk_python/src/auth/py.typed b/saasus_sdk_python/src/auth/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/saasus_sdk_python/src/auth/rest.py b/saasus_sdk_python/src/auth/rest.py new file mode 100644 index 0000000..5015f7c --- /dev/null +++ b/saasus_sdk_python/src/auth/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.auth.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/saasus_sdk_python/src/awsmarketplace/__init__.py b/saasus_sdk_python/src/awsmarketplace/__init__.py new file mode 100644 index 0000000..818cc05 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/__init__.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.awsmarketplace.api.aws_marketplace_api import AwsMarketplaceApi +from saasus_sdk_python.src.awsmarketplace.api.error_api import ErrorApi + +# import ApiClient +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient +from saasus_sdk_python.src.awsmarketplace.configuration import Configuration +from saasus_sdk_python.src.awsmarketplace.exceptions import OpenApiException +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiTypeError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiValueError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiKeyError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiAttributeError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.models.error import Error +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.models.visibility_status import VisibilityStatus diff --git a/saasus_sdk_python/src/awsmarketplace/api/__init__.py b/saasus_sdk_python/src/awsmarketplace/api/__init__.py new file mode 100644 index 0000000..81fb350 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.awsmarketplace.api.aws_marketplace_api import AwsMarketplaceApi +from saasus_sdk_python.src.awsmarketplace.api.error_api import ErrorApi + diff --git a/saasus_sdk_python/src/awsmarketplace/api/aws_marketplace_api.py b/saasus_sdk_python/src/awsmarketplace/api/aws_marketplace_api.py new file mode 100644 index 0000000..51e491e --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/api/aws_marketplace_api.py @@ -0,0 +1,1999 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import List, Optional + +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +from saasus_sdk_python.src.awsmarketplace.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AwsMarketplaceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_customer(self, create_customer_param : Optional[CreateCustomerParam] = None, **kwargs) -> Customer: # noqa: E501 + """Create customer information to be linked to AWS Marketplace # noqa: E501 + + Create customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_customer(create_customer_param, async_req=True) + >>> result = thread.get() + + :param create_customer_param: + :type create_customer_param: CreateCustomerParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Customer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_customer_with_http_info(create_customer_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_customer_with_http_info(self, create_customer_param : Optional[CreateCustomerParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create customer information to be linked to AWS Marketplace # noqa: E501 + + Create customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_customer_with_http_info(create_customer_param, async_req=True) + >>> result = thread.get() + + :param create_customer_param: + :type create_customer_param: CreateCustomerParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Customer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'create_customer_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_customer_param'] is not None: + _body_params = _params['create_customer_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Customer", + '500': "Error", + } + + return self.api_client.call_api( + '/customers', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_catalog_entity_visibility(self, **kwargs) -> CatalogEntityVisibility: # noqa: E501 + """Obtain product publication status from AWS Marketplace # noqa: E501 + + Retrieve the product's publication status from AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_catalog_entity_visibility(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CatalogEntityVisibility + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_catalog_entity_visibility_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_catalog_entity_visibility_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_catalog_entity_visibility_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Obtain product publication status from AWS Marketplace # noqa: E501 + + Retrieve the product's publication status from AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_catalog_entity_visibility_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CatalogEntityVisibility, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_catalog_entity_visibility" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CatalogEntityVisibility", + '500': "Error", + } + + return self.api_client.call_api( + '/catalog-entity/visibility', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_cloud_formation_launch_stack_link(self, **kwargs) -> CloudFormationLaunchStackLink: # noqa: E501 + """Get the link to create the AWS CloudFormation stack # noqa: E501 + + Get the CloudFormation Quick Create link. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CloudFormationLaunchStackLink + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_cloud_formation_launch_stack_link_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_cloud_formation_launch_stack_link_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_cloud_formation_launch_stack_link_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get the link to create the AWS CloudFormation stack # noqa: E501 + + Get the CloudFormation Quick Create link. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CloudFormationLaunchStackLink, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cloud_formation_launch_stack_link" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CloudFormationLaunchStackLink", + '500': "Error", + } + + return self.api_client.call_api( + '/cloudformation-launch-stack-link', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customer(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> Customer: # noqa: E501 + """Get customer information to be linked to AWS Marketplace # noqa: E501 + + Get customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customer(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Customer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customer_with_http_info(customer_identifier, **kwargs) # noqa: E501 + + @validate_arguments + def get_customer_with_http_info(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get customer information to be linked to AWS Marketplace # noqa: E501 + + Get customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customer_with_http_info(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Customer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'customer_identifier' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['customer_identifier']: + _path_params['customer_identifier'] = _params['customer_identifier'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Customer", + '500': "Error", + } + + return self.api_client.call_api( + '/customers/{customer_identifier}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customers(self, tenant_ids : Annotated[Optional[Annotated[List[StrictStr], Field()]], Field(description="指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID)")] = None, **kwargs) -> Customers: # noqa: E501 + """Get a list of customer information to be linked to AWS Marketplace # noqa: E501 + + Get a list of customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customers(tenant_ids, async_req=True) + >>> result = thread.get() + + :param tenant_ids: 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) + :type tenant_ids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Customers + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customers_with_http_info(tenant_ids, **kwargs) # noqa: E501 + + @validate_arguments + def get_customers_with_http_info(self, tenant_ids : Annotated[Optional[Annotated[List[StrictStr], Field()]], Field(description="指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID)")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get a list of customer information to be linked to AWS Marketplace # noqa: E501 + + Get a list of customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customers_with_http_info(tenant_ids, async_req=True) + >>> result = thread.get() + + :param tenant_ids: 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) + :type tenant_ids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Customers, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_ids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customers" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('tenant_ids') is not None: # noqa: E501 + _query_params.append(('tenant_ids', _params['tenant_ids'])) + _collection_formats['tenant_ids'] = 'multi' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Customers", + '500': "Error", + } + + return self.api_client.call_api( + '/customers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_listing_status(self, **kwargs) -> GetListingStatusResult: # noqa: E501 + """Get AWS Marketplace Listing Status # noqa: E501 + + Get AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_listing_status(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: GetListingStatusResult + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_listing_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_listing_status_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_listing_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get AWS Marketplace Listing Status # noqa: E501 + + Get AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_listing_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(GetListingStatusResult, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_listing_status" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "GetListingStatusResult", + '500': "Error", + } + + return self.api_client.call_api( + '/listing-status', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_plan_by_plan_name(self, plan_name : Annotated[StrictStr, Field(..., description="AWS Marketplace linked plan name")], **kwargs) -> Plan: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plan_by_plan_name(plan_name, async_req=True) + >>> result = thread.get() + + :param plan_name: AWS Marketplace linked plan name (required) + :type plan_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Plan + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_plan_by_plan_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_plan_by_plan_name_with_http_info(plan_name, **kwargs) # noqa: E501 + + @validate_arguments + def get_plan_by_plan_name_with_http_info(self, plan_name : Annotated[StrictStr, Field(..., description="AWS Marketplace linked plan name")], **kwargs) -> ApiResponse: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plan_by_plan_name_with_http_info(plan_name, async_req=True) + >>> result = thread.get() + + :param plan_name: AWS Marketplace linked plan name (required) + :type plan_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Plan, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'plan_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_plan_by_plan_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_name']: + _path_params['plan_name'] = _params['plan_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Plan", + '500': "Error", + } + + return self.api_client.call_api( + '/plans/{plan_name}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_plans(self, **kwargs) -> Plans: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plans(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Plans + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_plans_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_plans_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_plans_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Plans, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_plans" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Plans", + '500': "Error", + } + + return self.api_client.call_api( + '/plans', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_settings(self, **kwargs) -> Settings: # noqa: E501 + """Get AWS Marketplace Settings # noqa: E501 + + Get AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Settings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get AWS Marketplace Settings # noqa: E501 + + Get AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Settings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Settings", + '500': "Error", + } + + return self.api_client.call_api( + '/settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def save_plan(self, save_plan_param : Optional[SavePlanParam] = None, **kwargs) -> None: # noqa: E501 + """Save plan information to be linked to AWSMarketplace # noqa: E501 + + Save plan information to be linked to AWSMarketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_plan(save_plan_param, async_req=True) + >>> result = thread.get() + + :param save_plan_param: + :type save_plan_param: SavePlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the save_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.save_plan_with_http_info(save_plan_param, **kwargs) # noqa: E501 + + @validate_arguments + def save_plan_with_http_info(self, save_plan_param : Optional[SavePlanParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Save plan information to be linked to AWSMarketplace # noqa: E501 + + Save plan information to be linked to AWSMarketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_plan_with_http_info(save_plan_param, async_req=True) + >>> result = thread.get() + + :param save_plan_param: + :type save_plan_param: SavePlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'save_plan_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method save_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['save_plan_param'] is not None: + _body_params = _params['save_plan_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def sync_customer(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> None: # noqa: E501 + """Sync AWS Marketplace customer information to SaaSus # noqa: E501 + + Sync AWS Marketplace customer information to SaaSus. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sync_customer(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the sync_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.sync_customer_with_http_info(customer_identifier, **kwargs) # noqa: E501 + + @validate_arguments + def sync_customer_with_http_info(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Sync AWS Marketplace customer information to SaaSus # noqa: E501 + + Sync AWS Marketplace customer information to SaaSus. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sync_customer_with_http_info(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'customer_identifier' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sync_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['customer_identifier']: + _path_params['customer_identifier'] = _params['customer_identifier'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/customers/{customer_identifier}/sync', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_listing_status(self, update_listing_status_param : Optional[UpdateListingStatusParam] = None, **kwargs) -> None: # noqa: E501 + """Update AWS Marketplace Listing Status # noqa: E501 + + Update AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_listing_status(update_listing_status_param, async_req=True) + >>> result = thread.get() + + :param update_listing_status_param: + :type update_listing_status_param: UpdateListingStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_listing_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_listing_status_with_http_info(update_listing_status_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_listing_status_with_http_info(self, update_listing_status_param : Optional[UpdateListingStatusParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update AWS Marketplace Listing Status # noqa: E501 + + Update AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_listing_status_with_http_info(update_listing_status_param, async_req=True) + >>> result = thread.get() + + :param update_listing_status_param: + :type update_listing_status_param: UpdateListingStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_listing_status_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_listing_status" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_listing_status_param'] is not None: + _body_params = _params['update_listing_status_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/listing-status', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_settings(self, update_settings_param : Optional[UpdateSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update AWS Marketplace Settings # noqa: E501 + + Update AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_settings(update_settings_param, async_req=True) + >>> result = thread.get() + + :param update_settings_param: + :type update_settings_param: UpdateSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_settings_with_http_info(update_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_settings_with_http_info(self, update_settings_param : Optional[UpdateSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update AWS Marketplace Settings # noqa: E501 + + Update AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_settings_with_http_info(update_settings_param, async_req=True) + >>> result = thread.get() + + :param update_settings_param: + :type update_settings_param: UpdateSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_settings_param'] is not None: + _body_params = _params['update_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/settings', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def verify_registration_token(self, verify_registration_token_param : Optional[VerifyRegistrationTokenParam] = None, **kwargs) -> None: # noqa: E501 + """Verify Registration Token # noqa: E501 + + Verify Registration Token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.verify_registration_token(verify_registration_token_param, async_req=True) + >>> result = thread.get() + + :param verify_registration_token_param: + :type verify_registration_token_param: VerifyRegistrationTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the verify_registration_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.verify_registration_token_with_http_info(verify_registration_token_param, **kwargs) # noqa: E501 + + @validate_arguments + def verify_registration_token_with_http_info(self, verify_registration_token_param : Optional[VerifyRegistrationTokenParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Verify Registration Token # noqa: E501 + + Verify Registration Token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.verify_registration_token_with_http_info(verify_registration_token_param, async_req=True) + >>> result = thread.get() + + :param verify_registration_token_param: + :type verify_registration_token_param: VerifyRegistrationTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'verify_registration_token_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_registration_token" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['verify_registration_token_param'] is not None: + _body_params = _params['verify_registration_token_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/registration-token/verify', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/awsmarketplace/api/error_api.py b/saasus_sdk_python/src/awsmarketplace/api/error_api.py new file mode 100644 index 0000000..f8b294b --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +from saasus_sdk_python.src.awsmarketplace.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/awsmarketplace/api_client.py b/saasus_sdk_python/src/awsmarketplace/api_client.py new file mode 100644 index 0000000..8d9d147 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.awsmarketplace.configuration import Configuration +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +import saasus_sdk_python.src.awsmarketplace.models +from saasus_sdk_python.src.awsmarketplace import rest +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.awsmarketplace.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/src/awsmarketplace/api_response.py b/saasus_sdk_python/src/awsmarketplace/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/saasus_sdk_python/src/awsmarketplace/configuration.py b/saasus_sdk_python/src/awsmarketplace/configuration.py new file mode 100644 index 0000000..c5fdc67 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/awsmarketplace" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.awsmarketplace") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/awsmarketplace", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/awsmarketplace/exceptions.py b/saasus_sdk_python/src/awsmarketplace/exceptions.py new file mode 100644 index 0000000..5b8f629 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/awsmarketplace/models/__init__.py b/saasus_sdk_python/src/awsmarketplace/models/__init__.py new file mode 100644 index 0000000..5409d6f --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/__init__.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.models.error import Error +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.models.visibility_status import VisibilityStatus diff --git a/saasus_sdk_python/src/awsmarketplace/models/catalog_entity_visibility.py b/saasus_sdk_python/src/awsmarketplace/models/catalog_entity_visibility.py new file mode 100644 index 0000000..37ca597 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/catalog_entity_visibility.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.visibility_status import VisibilityStatus + +class CatalogEntityVisibility(BaseModel): + """ + CatalogEntityVisibility + """ + visibility: VisibilityStatus = Field(...) + __properties = ["visibility"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CatalogEntityVisibility: + """Create an instance of CatalogEntityVisibility from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CatalogEntityVisibility: + """Create an instance of CatalogEntityVisibility from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CatalogEntityVisibility.parse_obj(obj) + + _obj = CatalogEntityVisibility.parse_obj({ + "visibility": obj.get("visibility") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/cloud_formation_launch_stack_link.py b/saasus_sdk_python/src/awsmarketplace/models/cloud_formation_launch_stack_link.py new file mode 100644 index 0000000..d6634d5 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/cloud_formation_launch_stack_link.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CloudFormationLaunchStackLink(BaseModel): + """ + CloudFormationLaunchStackLink + """ + link: StrictStr = Field(...) + __properties = ["link"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CloudFormationLaunchStackLink.parse_obj(obj) + + _obj = CloudFormationLaunchStackLink.parse_obj({ + "link": obj.get("link") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/create_customer_param.py b/saasus_sdk_python/src/awsmarketplace/models/create_customer_param.py new file mode 100644 index 0000000..d8f5a33 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/create_customer_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateCustomerParam(BaseModel): + """ + CreateCustomerParam + """ + tenant_id: StrictStr = Field(...) + registration_token: StrictStr = Field(...) + __properties = ["tenant_id", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateCustomerParam: + """Create an instance of CreateCustomerParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateCustomerParam: + """Create an instance of CreateCustomerParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateCustomerParam.parse_obj(obj) + + _obj = CreateCustomerParam.parse_obj({ + "tenant_id": obj.get("tenant_id"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/customer.py b/saasus_sdk_python/src/awsmarketplace/models/customer.py new file mode 100644 index 0000000..7ef50e4 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/customer.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Customer(BaseModel): + """ + Customer + """ + customer_identifier: StrictStr = Field(...) + customer_aws_account_id: StrictStr = Field(...) + tenant_id: StrictStr = Field(...) + __properties = ["customer_identifier", "customer_aws_account_id", "tenant_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Customer: + """Create an instance of Customer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Customer: + """Create an instance of Customer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Customer.parse_obj(obj) + + _obj = Customer.parse_obj({ + "customer_identifier": obj.get("customer_identifier"), + "customer_aws_account_id": obj.get("customer_aws_account_id"), + "tenant_id": obj.get("tenant_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/customers.py b/saasus_sdk_python/src/awsmarketplace/models/customers.py new file mode 100644 index 0000000..d75e4d7 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/customers.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from typing_extensions import Annotated + +class Customers(BaseModel): + """ + Customers + """ + customers: Annotated[List[Customer], Field()] = Field(...) + __properties = ["customers"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Customers: + """Create an instance of Customers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in customers (list) + _items = [] + if self.customers: + for _item in self.customers: + if _item: + _items.append(_item.to_dict()) + _dict['customers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Customers: + """Create an instance of Customers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Customers.parse_obj(obj) + + _obj = Customers.parse_obj({ + "customers": [Customer.from_dict(_item) for _item in obj.get("customers")] if obj.get("customers") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/error.py b/saasus_sdk_python/src/awsmarketplace/models/error.py new file mode 100644 index 0000000..d63f0b0 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(...) + message: StrictStr = Field(...) + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/get_listing_status_result.py b/saasus_sdk_python/src/awsmarketplace/models/get_listing_status_result.py new file mode 100644 index 0000000..def5633 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/get_listing_status_result.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus + +class GetListingStatusResult(BaseModel): + """ + GetListingStatusResult + """ + listing_status: ListingStatus = Field(...) + __properties = ["listing_status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> GetListingStatusResult: + """Create an instance of GetListingStatusResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> GetListingStatusResult: + """Create an instance of GetListingStatusResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return GetListingStatusResult.parse_obj(obj) + + _obj = GetListingStatusResult.parse_obj({ + "listing_status": obj.get("listing_status") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/listing_status.py b/saasus_sdk_python/src/awsmarketplace/models/listing_status.py new file mode 100644 index 0000000..981aca9 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/listing_status.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ListingStatus(str, Enum): + """ + ListingStatus + """ + + """ + allowed enum values + """ + NO_LISTING = 'no_listing' + FIRST_STEP_WORKING = 'first_step_working' + FIRST_STEP_COMPLETED = 'first_step_completed' + SECOND_STEP_WORKING = 'second_step_working' + SECOND_STEP_PLAN_CREATED = 'second_step_plan_created' + SECOND_STEP_COMPLETED = 'second_step_completed' + THIRD_STEP_WORKING = 'third_step_working' + THIRD_STEP_COMPLETED = 'third_step_completed' + LIMITED = 'limited' + RESTRICTED = 'restricted' + PUBLIC = 'public' + + @classmethod + def from_json(cls, json_str: str) -> ListingStatus: + """Create an instance of ListingStatus from a JSON string""" + return ListingStatus(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/plan.py b/saasus_sdk_python/src/awsmarketplace/models/plan.py new file mode 100644 index 0000000..27591f7 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/plan.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Plan(BaseModel): + """ + Plan + """ + plan_id: StrictStr = Field(...) + plan_name: StrictStr = Field(...) + __properties = ["plan_id", "plan_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Plan: + """Create an instance of Plan from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Plan: + """Create an instance of Plan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Plan.parse_obj(obj) + + _obj = Plan.parse_obj({ + "plan_id": obj.get("plan_id"), + "plan_name": obj.get("plan_name") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/plans.py b/saasus_sdk_python/src/awsmarketplace/models/plans.py new file mode 100644 index 0000000..aecda7f --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/plans.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from typing_extensions import Annotated + +class Plans(BaseModel): + """ + Plans + """ + plans: Annotated[List[Plan], Field()] = Field(...) + __properties = ["plans"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Plans: + """Create an instance of Plans from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in plans (list) + _items = [] + if self.plans: + for _item in self.plans: + if _item: + _items.append(_item.to_dict()) + _dict['plans'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Plans: + """Create an instance of Plans from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Plans.parse_obj(obj) + + _obj = Plans.parse_obj({ + "plans": [Plan.from_dict(_item) for _item in obj.get("plans")] if obj.get("plans") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/save_plan_param.py b/saasus_sdk_python/src/awsmarketplace/models/save_plan_param.py new file mode 100644 index 0000000..dc8eca5 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/save_plan_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SavePlanParam(BaseModel): + """ + SavePlanParam + """ + plan_id: StrictStr = Field(...) + plan_name: StrictStr = Field(...) + __properties = ["plan_id", "plan_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SavePlanParam: + """Create an instance of SavePlanParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SavePlanParam: + """Create an instance of SavePlanParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SavePlanParam.parse_obj(obj) + + _obj = SavePlanParam.parse_obj({ + "plan_id": obj.get("plan_id"), + "plan_name": obj.get("plan_name") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/settings.py b/saasus_sdk_python/src/awsmarketplace/models/settings.py new file mode 100644 index 0000000..52c7a04 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/settings.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Settings(BaseModel): + """ + Settings + """ + product_code: StrictStr = Field(...) + role_arn: StrictStr = Field(...) + role_external_id: StrictStr = Field(...) + sns_topic_arn: StrictStr = Field(...) + cas_bucket_name: StrictStr = Field(...) + cas_sns_topic_arn: StrictStr = Field(...) + seller_sns_topic_arn: StrictStr = Field(...) + redirect_sign_up_page_function_url: StrictStr = Field(...) + sqs_arn: StrictStr = Field(...) + __properties = ["product_code", "role_arn", "role_external_id", "sns_topic_arn", "cas_bucket_name", "cas_sns_topic_arn", "seller_sns_topic_arn", "redirect_sign_up_page_function_url", "sqs_arn"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Settings: + """Create an instance of Settings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Settings: + """Create an instance of Settings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Settings.parse_obj(obj) + + _obj = Settings.parse_obj({ + "product_code": obj.get("product_code"), + "role_arn": obj.get("role_arn"), + "role_external_id": obj.get("role_external_id"), + "sns_topic_arn": obj.get("sns_topic_arn"), + "cas_bucket_name": obj.get("cas_bucket_name"), + "cas_sns_topic_arn": obj.get("cas_sns_topic_arn"), + "seller_sns_topic_arn": obj.get("seller_sns_topic_arn"), + "redirect_sign_up_page_function_url": obj.get("redirect_sign_up_page_function_url"), + "sqs_arn": obj.get("sqs_arn") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/update_listing_status_param.py b/saasus_sdk_python/src/awsmarketplace/models/update_listing_status_param.py new file mode 100644 index 0000000..276545a --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/update_listing_status_param.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus + +class UpdateListingStatusParam(BaseModel): + """ + UpdateListingStatusParam + """ + listing_status: ListingStatus = Field(...) + __properties = ["listing_status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateListingStatusParam: + """Create an instance of UpdateListingStatusParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateListingStatusParam: + """Create an instance of UpdateListingStatusParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateListingStatusParam.parse_obj(obj) + + _obj = UpdateListingStatusParam.parse_obj({ + "listing_status": obj.get("listing_status") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/update_settings_param.py b/saasus_sdk_python/src/awsmarketplace/models/update_settings_param.py new file mode 100644 index 0000000..85b8efe --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/update_settings_param.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, StrictStr + +class UpdateSettingsParam(BaseModel): + """ + UpdateSettingsParam + """ + product_code: Optional[StrictStr] = None + role_arn: Optional[StrictStr] = None + role_external_id: Optional[StrictStr] = None + sns_topic_arn: Optional[StrictStr] = None + cas_bucket_name: Optional[StrictStr] = None + cas_sns_topic_arn: Optional[StrictStr] = None + seller_sns_topic_arn: Optional[StrictStr] = None + sqs_arn: Optional[StrictStr] = None + __properties = ["product_code", "role_arn", "role_external_id", "sns_topic_arn", "cas_bucket_name", "cas_sns_topic_arn", "seller_sns_topic_arn", "sqs_arn"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSettingsParam: + """Create an instance of UpdateSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSettingsParam: + """Create an instance of UpdateSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSettingsParam.parse_obj(obj) + + _obj = UpdateSettingsParam.parse_obj({ + "product_code": obj.get("product_code"), + "role_arn": obj.get("role_arn"), + "role_external_id": obj.get("role_external_id"), + "sns_topic_arn": obj.get("sns_topic_arn"), + "cas_bucket_name": obj.get("cas_bucket_name"), + "cas_sns_topic_arn": obj.get("cas_sns_topic_arn"), + "seller_sns_topic_arn": obj.get("seller_sns_topic_arn"), + "sqs_arn": obj.get("sqs_arn") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/verify_registration_token_param.py b/saasus_sdk_python/src/awsmarketplace/models/verify_registration_token_param.py new file mode 100644 index 0000000..6174374 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/verify_registration_token_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class VerifyRegistrationTokenParam(BaseModel): + """ + VerifyRegistrationTokenParam + """ + registration_token: StrictStr = Field(...) + __properties = ["registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> VerifyRegistrationTokenParam: + """Create an instance of VerifyRegistrationTokenParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> VerifyRegistrationTokenParam: + """Create an instance of VerifyRegistrationTokenParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VerifyRegistrationTokenParam.parse_obj(obj) + + _obj = VerifyRegistrationTokenParam.parse_obj({ + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/saasus_sdk_python/src/awsmarketplace/models/visibility_status.py b/saasus_sdk_python/src/awsmarketplace/models/visibility_status.py new file mode 100644 index 0000000..938645b --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/models/visibility_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class VisibilityStatus(str, Enum): + """ + VisibilityStatus + """ + + """ + allowed enum values + """ + PUBLIC = 'Public' + LIMITED = 'Limited' + RESTRICTED = 'Restricted' + + @classmethod + def from_json(cls, json_str: str) -> VisibilityStatus: + """Create an instance of VisibilityStatus from a JSON string""" + return VisibilityStatus(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/awsmarketplace/py.typed b/saasus_sdk_python/src/awsmarketplace/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/saasus_sdk_python/src/awsmarketplace/rest.py b/saasus_sdk_python/src/awsmarketplace/rest.py new file mode 100644 index 0000000..2cfb1c3 --- /dev/null +++ b/saasus_sdk_python/src/awsmarketplace/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/saasus_sdk_python/src/billing/__init__.py b/saasus_sdk_python/src/billing/__init__.py new file mode 100644 index 0000000..3cc26ba --- /dev/null +++ b/saasus_sdk_python/src/billing/__init__.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.billing.api.error_api import ErrorApi +from saasus_sdk_python.src.billing.api.stripe_api import StripeApi + +# import ApiClient +from saasus_sdk_python.src.billing.api_response import ApiResponse +from saasus_sdk_python.src.billing.api_client import ApiClient +from saasus_sdk_python.src.billing.configuration import Configuration +from saasus_sdk_python.src.billing.exceptions import OpenApiException +from saasus_sdk_python.src.billing.exceptions import ApiTypeError +from saasus_sdk_python.src.billing.exceptions import ApiValueError +from saasus_sdk_python.src.billing.exceptions import ApiKeyError +from saasus_sdk_python.src.billing.exceptions import ApiAttributeError +from saasus_sdk_python.src.billing.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.billing.models.error import Error +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam diff --git a/saasus_sdk_python/src/billing/api/__init__.py b/saasus_sdk_python/src/billing/api/__init__.py new file mode 100644 index 0000000..1cb0ed8 --- /dev/null +++ b/saasus_sdk_python/src/billing/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.billing.api.error_api import ErrorApi +from saasus_sdk_python.src.billing.api.stripe_api import StripeApi + diff --git a/saasus_sdk_python/src/billing/api/error_api.py b/saasus_sdk_python/src/billing/api/error_api.py new file mode 100644 index 0000000..8142f52 --- /dev/null +++ b/saasus_sdk_python/src/billing/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.billing.api_client import ApiClient +from saasus_sdk_python.src.billing.api_response import ApiResponse +from saasus_sdk_python.src.billing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/billing/api/stripe_api.py b/saasus_sdk_python/src/billing/api/stripe_api.py new file mode 100644 index 0000000..699ee02 --- /dev/null +++ b/saasus_sdk_python/src/billing/api/stripe_api.py @@ -0,0 +1,450 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +from saasus_sdk_python.src.billing.api_client import ApiClient +from saasus_sdk_python.src.billing.api_response import ApiResponse +from saasus_sdk_python.src.billing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class StripeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def delete_stripe_info(self, **kwargs) -> None: # noqa: E501 + """Delete Stripe Connection # noqa: E501 + + Delete connection with external billing SaaS # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_stripe_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_stripe_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_stripe_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Stripe Connection # noqa: E501 + + Delete connection with external billing SaaS # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stripe_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/info', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_stripe_info(self, **kwargs) -> StripeInfo: # noqa: E501 + """Get Stripe Connection information # noqa: E501 + + Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: StripeInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_stripe_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_stripe_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_stripe_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Stripe Connection information # noqa: E501 + + Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StripeInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stripe_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "StripeInfo", + '500': "Error", + } + + return self.api_client.call_api( + '/stripe/info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_stripe_info(self, update_stripe_info_param : Optional[UpdateStripeInfoParam] = None, **kwargs) -> None: # noqa: E501 + """Update Stripe Connection Info # noqa: E501 + + Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_stripe_info(update_stripe_info_param, async_req=True) + >>> result = thread.get() + + :param update_stripe_info_param: + :type update_stripe_info_param: UpdateStripeInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_stripe_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_stripe_info_with_http_info(update_stripe_info_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_stripe_info_with_http_info(self, update_stripe_info_param : Optional[UpdateStripeInfoParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Stripe Connection Info # noqa: E501 + + Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_stripe_info_with_http_info(update_stripe_info_param, async_req=True) + >>> result = thread.get() + + :param update_stripe_info_param: + :type update_stripe_info_param: UpdateStripeInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_stripe_info_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_stripe_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_stripe_info_param'] is not None: + _body_params = _params['update_stripe_info_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/billing/api_client.py b/saasus_sdk_python/src/billing/api_client.py new file mode 100644 index 0000000..3ce5868 --- /dev/null +++ b/saasus_sdk_python/src/billing/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.billing.configuration import Configuration +from saasus_sdk_python.src.billing.api_response import ApiResponse +import saasus_sdk_python.src.billing.models +from saasus_sdk_python.src.billing import rest +from saasus_sdk_python.src.billing.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.billing.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/src/billing/api_response.py b/saasus_sdk_python/src/billing/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/saasus_sdk_python/src/billing/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/saasus_sdk_python/src/billing/configuration.py b/saasus_sdk_python/src/billing/configuration.py new file mode 100644 index 0000000..c3a0713 --- /dev/null +++ b/saasus_sdk_python/src/billing/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.billing.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/billing" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.billing") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/billing", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/billing/exceptions.py b/saasus_sdk_python/src/billing/exceptions.py new file mode 100644 index 0000000..fa9079d --- /dev/null +++ b/saasus_sdk_python/src/billing/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/billing/models/__init__.py b/saasus_sdk_python/src/billing/models/__init__.py new file mode 100644 index 0000000..782decc --- /dev/null +++ b/saasus_sdk_python/src/billing/models/__init__.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.billing.models.error import Error +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam diff --git a/saasus_sdk_python/src/billing/models/error.py b/saasus_sdk_python/src/billing/models/error.py new file mode 100644 index 0000000..62d979d --- /dev/null +++ b/saasus_sdk_python/src/billing/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/billing/models/stripe_info.py b/saasus_sdk_python/src/billing/models/stripe_info.py new file mode 100644 index 0000000..64aa8f0 --- /dev/null +++ b/saasus_sdk_python/src/billing/models/stripe_info.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool + +class StripeInfo(BaseModel): + """ + StripeInfo + """ + is_registered: StrictBool = Field(...) + __properties = ["is_registered"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StripeInfo: + """Create an instance of StripeInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StripeInfo: + """Create an instance of StripeInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StripeInfo.parse_obj(obj) + + _obj = StripeInfo.parse_obj({ + "is_registered": obj.get("is_registered") + }) + return _obj + + diff --git a/saasus_sdk_python/src/billing/models/update_stripe_info_param.py b/saasus_sdk_python/src/billing/models/update_stripe_info_param.py new file mode 100644 index 0000000..6fe0d93 --- /dev/null +++ b/saasus_sdk_python/src/billing/models/update_stripe_info_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateStripeInfoParam(BaseModel): + """ + UpdateStripeInfoParam + """ + secret_key: StrictStr = Field(..., description="secret key") + __properties = ["secret_key"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateStripeInfoParam: + """Create an instance of UpdateStripeInfoParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateStripeInfoParam: + """Create an instance of UpdateStripeInfoParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateStripeInfoParam.parse_obj(obj) + + _obj = UpdateStripeInfoParam.parse_obj({ + "secret_key": obj.get("secret_key") + }) + return _obj + + diff --git a/saasus_sdk_python/src/billing/py.typed b/saasus_sdk_python/src/billing/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/saasus_sdk_python/src/billing/rest.py b/saasus_sdk_python/src/billing/rest.py new file mode 100644 index 0000000..6c8ec97 --- /dev/null +++ b/saasus_sdk_python/src/billing/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.billing.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/saasus_sdk_python/src/communication/__init__.py b/saasus_sdk_python/src/communication/__init__.py new file mode 100644 index 0000000..b5453a4 --- /dev/null +++ b/saasus_sdk_python/src/communication/__init__.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.communication.api.error_api import ErrorApi +from saasus_sdk_python.src.communication.api.feedback_api import FeedbackApi + +# import ApiClient +from saasus_sdk_python.src.communication.api_response import ApiResponse +from saasus_sdk_python.src.communication.api_client import ApiClient +from saasus_sdk_python.src.communication.configuration import Configuration +from saasus_sdk_python.src.communication.exceptions import OpenApiException +from saasus_sdk_python.src.communication.exceptions import ApiTypeError +from saasus_sdk_python.src.communication.exceptions import ApiValueError +from saasus_sdk_python.src.communication.exceptions import ApiKeyError +from saasus_sdk_python.src.communication.exceptions import ApiAttributeError +from saasus_sdk_python.src.communication.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.comments import Comments +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.error import Error +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.models.user import User +from saasus_sdk_python.src.communication.models.users import Users +from saasus_sdk_python.src.communication.models.votes import Votes diff --git a/saasus_sdk_python/src/communication/api/__init__.py b/saasus_sdk_python/src/communication/api/__init__.py new file mode 100644 index 0000000..a85839b --- /dev/null +++ b/saasus_sdk_python/src/communication/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.communication.api.error_api import ErrorApi +from saasus_sdk_python.src.communication.api.feedback_api import FeedbackApi + diff --git a/saasus_sdk_python/src/communication/api/error_api.py b/saasus_sdk_python/src/communication/api/error_api.py new file mode 100644 index 0000000..6d7b636 --- /dev/null +++ b/saasus_sdk_python/src/communication/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.communication.api_client import ApiClient +from saasus_sdk_python.src.communication.api_response import ApiResponse +from saasus_sdk_python.src.communication.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/communication/api/feedback_api.py b/saasus_sdk_python/src/communication/api/feedback_api.py new file mode 100644 index 0000000..20fda36 --- /dev/null +++ b/saasus_sdk_python/src/communication/api/feedback_api.py @@ -0,0 +1,1827 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import StrictStr + +from typing import Optional + +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.models.votes import Votes + +from saasus_sdk_python.src.communication.api_client import ApiClient +from saasus_sdk_python.src.communication.api_response import ApiResponse +from saasus_sdk_python.src.communication.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class FeedbackApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_feedback(self, create_feedback_param : Optional[CreateFeedbackParam] = None, **kwargs) -> Feedback: # noqa: E501 + """Create Feedback # noqa: E501 + + Create Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback(create_feedback_param, async_req=True) + >>> result = thread.get() + + :param create_feedback_param: + :type create_feedback_param: CreateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Feedback + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_feedback_with_http_info(create_feedback_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_feedback_with_http_info(self, create_feedback_param : Optional[CreateFeedbackParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Feedback # noqa: E501 + + Create Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback_with_http_info(create_feedback_param, async_req=True) + >>> result = thread.get() + + :param create_feedback_param: + :type create_feedback_param: CreateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Feedback, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'create_feedback_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_feedback_param'] is not None: + _body_params = _params['create_feedback_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Feedback", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_feedback_comment(self, feedback_id : StrictStr, create_feedback_comment_param : Optional[CreateFeedbackCommentParam] = None, **kwargs) -> Comment: # noqa: E501 + """Create Feedback Comment # noqa: E501 + + Post comment to feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback_comment(feedback_id, create_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_feedback_comment_param: + :type create_feedback_comment_param: CreateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Comment + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_feedback_comment_with_http_info(feedback_id, create_feedback_comment_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_feedback_comment_with_http_info(self, feedback_id : StrictStr, create_feedback_comment_param : Optional[CreateFeedbackCommentParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Feedback Comment # noqa: E501 + + Post comment to feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback_comment_with_http_info(feedback_id, create_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_feedback_comment_param: + :type create_feedback_comment_param: CreateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Comment, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'create_feedback_comment_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_feedback_comment_param'] is not None: + _body_params = _params['create_feedback_comment_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Comment", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_vote_user(self, feedback_id : StrictStr, create_vote_user_param : Optional[CreateVoteUserParam] = None, **kwargs) -> Votes: # noqa: E501 + """Create Vote User # noqa: E501 + + Vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_vote_user(feedback_id, create_vote_user_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_vote_user_param: + :type create_vote_user_param: CreateVoteUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Votes + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_vote_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_vote_user_with_http_info(feedback_id, create_vote_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_vote_user_with_http_info(self, feedback_id : StrictStr, create_vote_user_param : Optional[CreateVoteUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Vote User # noqa: E501 + + Vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_vote_user_with_http_info(feedback_id, create_vote_user_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_vote_user_param: + :type create_vote_user_param: CreateVoteUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Votes, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'create_vote_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_vote_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_vote_user_param'] is not None: + _body_params = _params['create_vote_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Votes", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/votes/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_feedback(self, feedback_id : StrictStr, **kwargs) -> None: # noqa: E501 + """Delete Feedback # noqa: E501 + + Delete Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_feedback_with_http_info(feedback_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_feedback_with_http_info(self, feedback_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Feedback # noqa: E501 + + Delete Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback_with_http_info(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_feedback_comment(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> None: # noqa: E501 + """Delete Feedback Comment # noqa: E501 + + Delete comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback_comment(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_feedback_comment_with_http_info(feedback_id, comment_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_feedback_comment_with_http_info(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Feedback Comment # noqa: E501 + + Delete comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback_comment_with_http_info(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'comment_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['comment_id']: + _path_params['comment_id'] = _params['comment_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments/{comment_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_vote_for_feedback(self, feedback_id : StrictStr, user_id : StrictStr, **kwargs) -> None: # noqa: E501 + """Delete Vote For Feedback # noqa: E501 + + Cancel vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_vote_for_feedback(feedback_id, user_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param user_id: (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_vote_for_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_vote_for_feedback_with_http_info(feedback_id, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_vote_for_feedback_with_http_info(self, feedback_id : StrictStr, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Vote For Feedback # noqa: E501 + + Cancel vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_vote_for_feedback_with_http_info(feedback_id, user_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param user_id: (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_vote_for_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/votes/users/{user_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_feedback(self, feedback_id : StrictStr, **kwargs) -> Feedback: # noqa: E501 + """Get Feedback # noqa: E501 + + Retrieve feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Feedback + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_feedback_with_http_info(feedback_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_feedback_with_http_info(self, feedback_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Get Feedback # noqa: E501 + + Retrieve feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback_with_http_info(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Feedback, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Feedback", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_feedback_comment(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> Comment: # noqa: E501 + """Get Feedback Comment # noqa: E501 + + Retrieve comment from feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback_comment(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Comment + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_feedback_comment_with_http_info(feedback_id, comment_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_feedback_comment_with_http_info(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Get Feedback Comment # noqa: E501 + + Retrieve comment from feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback_comment_with_http_info(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Comment, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'comment_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['comment_id']: + _path_params['comment_id'] = _params['comment_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Comment", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments/{comment_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_feedbacks(self, **kwargs) -> Feedbacks: # noqa: E501 + """Get Feedbacks # noqa: E501 + + Get the list of feedbacks. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedbacks(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Feedbacks + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_feedbacks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_feedbacks_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_feedbacks_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Feedbacks # noqa: E501 + + Get the list of feedbacks. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedbacks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Feedbacks, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_feedbacks" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Feedbacks", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_feedback(self, feedback_id : StrictStr, update_feedback_param : Optional[UpdateFeedbackParam] = None, **kwargs) -> None: # noqa: E501 + """Update Feedback # noqa: E501 + + Edit feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback(feedback_id, update_feedback_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_param: + :type update_feedback_param: UpdateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_feedback_with_http_info(feedback_id, update_feedback_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_feedback_with_http_info(self, feedback_id : StrictStr, update_feedback_param : Optional[UpdateFeedbackParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Feedback # noqa: E501 + + Edit feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_with_http_info(feedback_id, update_feedback_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_param: + :type update_feedback_param: UpdateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'update_feedback_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_feedback_param'] is not None: + _body_params = _params['update_feedback_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_feedback_comment(self, feedback_id : StrictStr, comment_id : StrictStr, update_feedback_comment_param : Optional[UpdateFeedbackCommentParam] = None, **kwargs) -> None: # noqa: E501 + """Update Feedback Comment # noqa: E501 + + Edit comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param update_feedback_comment_param: + :type update_feedback_comment_param: UpdateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_feedback_comment_with_http_info(feedback_id, comment_id, update_feedback_comment_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_feedback_comment_with_http_info(self, feedback_id : StrictStr, comment_id : StrictStr, update_feedback_comment_param : Optional[UpdateFeedbackCommentParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Feedback Comment # noqa: E501 + + Edit comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_comment_with_http_info(feedback_id, comment_id, update_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param update_feedback_comment_param: + :type update_feedback_comment_param: UpdateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'comment_id', + 'update_feedback_comment_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['comment_id']: + _path_params['comment_id'] = _params['comment_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_feedback_comment_param'] is not None: + _body_params = _params['update_feedback_comment_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments/{comment_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_feedback_status(self, feedback_id : StrictStr, update_feedback_status_param : Optional[UpdateFeedbackStatusParam] = None, **kwargs) -> None: # noqa: E501 + """Update Feedback Status # noqa: E501 + + Update Feedback Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_status(feedback_id, update_feedback_status_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_status_param: + :type update_feedback_status_param: UpdateFeedbackStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_feedback_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_feedback_status_with_http_info(feedback_id, update_feedback_status_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_feedback_status_with_http_info(self, feedback_id : StrictStr, update_feedback_status_param : Optional[UpdateFeedbackStatusParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Feedback Status # noqa: E501 + + Update Feedback Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_status_with_http_info(feedback_id, update_feedback_status_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_status_param: + :type update_feedback_status_param: UpdateFeedbackStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'update_feedback_status_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_feedback_status" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_feedback_status_param'] is not None: + _body_params = _params['update_feedback_status_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/status', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/communication/api_client.py b/saasus_sdk_python/src/communication/api_client.py new file mode 100644 index 0000000..c2f481d --- /dev/null +++ b/saasus_sdk_python/src/communication/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.communication.configuration import Configuration +from saasus_sdk_python.src.communication.api_response import ApiResponse +import saasus_sdk_python.src.communication.models +from saasus_sdk_python.src.communication import rest +from saasus_sdk_python.src.communication.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.communication.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/src/communication/api_response.py b/saasus_sdk_python/src/communication/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/saasus_sdk_python/src/communication/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/saasus_sdk_python/src/communication/configuration.py b/saasus_sdk_python/src/communication/configuration.py new file mode 100644 index 0000000..0d3333c --- /dev/null +++ b/saasus_sdk_python/src/communication/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.communication.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/communication" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.communication") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/communication", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/communication/exceptions.py b/saasus_sdk_python/src/communication/exceptions.py new file mode 100644 index 0000000..a4b72f0 --- /dev/null +++ b/saasus_sdk_python/src/communication/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/communication/models/__init__.py b/saasus_sdk_python/src/communication/models/__init__.py new file mode 100644 index 0000000..9ca3c3f --- /dev/null +++ b/saasus_sdk_python/src/communication/models/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.comments import Comments +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.error import Error +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.models.user import User +from saasus_sdk_python.src.communication.models.users import Users +from saasus_sdk_python.src.communication.models.votes import Votes diff --git a/saasus_sdk_python/src/communication/models/comment.py b/saasus_sdk_python/src/communication/models/comment.py new file mode 100644 index 0000000..a2f73f8 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/comment.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class Comment(BaseModel): + """ + Comment + """ + id: StrictStr = Field(...) + created_at: StrictInt = Field(...) + body: StrictStr = Field(...) + __properties = ["id", "created_at", "body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Comment: + """Create an instance of Comment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Comment: + """Create an instance of Comment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Comment.parse_obj(obj) + + _obj = Comment.parse_obj({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "body": obj.get("body") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/comments.py b/saasus_sdk_python/src/communication/models/comments.py new file mode 100644 index 0000000..a9cc435 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/comments.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.communication.models.comment import Comment +from typing_extensions import Annotated + +class Comments(BaseModel): + """ + Comments + """ + comments: Annotated[List[Comment], Field()] = Field(...) + __properties = ["comments"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Comments: + """Create an instance of Comments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in comments (list) + _items = [] + if self.comments: + for _item in self.comments: + if _item: + _items.append(_item.to_dict()) + _dict['comments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Comments: + """Create an instance of Comments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Comments.parse_obj(obj) + + _obj = Comments.parse_obj({ + "comments": [Comment.from_dict(_item) for _item in obj.get("comments")] if obj.get("comments") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/create_feedback_comment_param.py b/saasus_sdk_python/src/communication/models/create_feedback_comment_param.py new file mode 100644 index 0000000..cc3e102 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/create_feedback_comment_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateFeedbackCommentParam(BaseModel): + """ + CreateFeedbackCommentParam + """ + body: StrictStr = Field(...) + __properties = ["body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateFeedbackCommentParam: + """Create an instance of CreateFeedbackCommentParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateFeedbackCommentParam: + """Create an instance of CreateFeedbackCommentParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateFeedbackCommentParam.parse_obj(obj) + + _obj = CreateFeedbackCommentParam.parse_obj({ + "body": obj.get("body") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/create_feedback_param.py b/saasus_sdk_python/src/communication/models/create_feedback_param.py new file mode 100644 index 0000000..3d9e572 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/create_feedback_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateFeedbackParam(BaseModel): + """ + CreateFeedbackParam + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + user_id: StrictStr = Field(...) + __properties = ["feedback_title", "feedback_description", "user_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateFeedbackParam: + """Create an instance of CreateFeedbackParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateFeedbackParam: + """Create an instance of CreateFeedbackParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateFeedbackParam.parse_obj(obj) + + _obj = CreateFeedbackParam.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description"), + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/create_vote_user_param.py b/saasus_sdk_python/src/communication/models/create_vote_user_param.py new file mode 100644 index 0000000..759041c --- /dev/null +++ b/saasus_sdk_python/src/communication/models/create_vote_user_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateVoteUserParam(BaseModel): + """ + CreateVoteUserParam + """ + user_id: StrictStr = Field(...) + __properties = ["user_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateVoteUserParam: + """Create an instance of CreateVoteUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateVoteUserParam: + """Create an instance of CreateVoteUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateVoteUserParam.parse_obj(obj) + + _obj = CreateVoteUserParam.parse_obj({ + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/error.py b/saasus_sdk_python/src/communication/models/error.py new file mode 100644 index 0000000..cd18774 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/feedback.py b/saasus_sdk_python/src/communication/models/feedback.py new file mode 100644 index 0000000..822f221 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/feedback.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.user import User +from typing_extensions import Annotated + +class Feedback(BaseModel): + """ + Feedback + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + comments: Annotated[List[Comment], Field()] = Field(...) + count: StrictInt = Field(...) + users: Annotated[List[User], Field()] = Field(...) + id: StrictStr = Field(...) + user_id: StrictStr = Field(...) + created_at: StrictInt = Field(...) + status: StrictInt = Field(...) + __properties = ["feedback_title", "feedback_description", "comments", "count", "users", "id", "user_id", "created_at", "status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Feedback: + """Create an instance of Feedback from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in comments (list) + _items = [] + if self.comments: + for _item in self.comments: + if _item: + _items.append(_item.to_dict()) + _dict['comments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Feedback: + """Create an instance of Feedback from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Feedback.parse_obj(obj) + + _obj = Feedback.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description"), + "comments": [Comment.from_dict(_item) for _item in obj.get("comments")] if obj.get("comments") is not None else None, + "count": obj.get("count"), + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None, + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "created_at": obj.get("created_at"), + "status": obj.get("status") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/feedback_save_props.py b/saasus_sdk_python/src/communication/models/feedback_save_props.py new file mode 100644 index 0000000..c4ebf51 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/feedback_save_props.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class FeedbackSaveProps(BaseModel): + """ + FeedbackSaveProps + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + __properties = ["feedback_title", "feedback_description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> FeedbackSaveProps: + """Create an instance of FeedbackSaveProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> FeedbackSaveProps: + """Create an instance of FeedbackSaveProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FeedbackSaveProps.parse_obj(obj) + + _obj = FeedbackSaveProps.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/feedbacks.py b/saasus_sdk_python/src/communication/models/feedbacks.py new file mode 100644 index 0000000..272d6d6 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/feedbacks.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.communication.models.feedback import Feedback +from typing_extensions import Annotated + +class Feedbacks(BaseModel): + """ + Feedbacks + """ + feedbacks: Annotated[List[Feedback], Field()] = Field(...) + __properties = ["feedbacks"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Feedbacks: + """Create an instance of Feedbacks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in feedbacks (list) + _items = [] + if self.feedbacks: + for _item in self.feedbacks: + if _item: + _items.append(_item.to_dict()) + _dict['feedbacks'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Feedbacks: + """Create an instance of Feedbacks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Feedbacks.parse_obj(obj) + + _obj = Feedbacks.parse_obj({ + "feedbacks": [Feedback.from_dict(_item) for _item in obj.get("feedbacks")] if obj.get("feedbacks") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/update_feedback_comment_param.py b/saasus_sdk_python/src/communication/models/update_feedback_comment_param.py new file mode 100644 index 0000000..011984f --- /dev/null +++ b/saasus_sdk_python/src/communication/models/update_feedback_comment_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateFeedbackCommentParam(BaseModel): + """ + UpdateFeedbackCommentParam + """ + body: StrictStr = Field(...) + __properties = ["body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateFeedbackCommentParam: + """Create an instance of UpdateFeedbackCommentParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateFeedbackCommentParam: + """Create an instance of UpdateFeedbackCommentParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateFeedbackCommentParam.parse_obj(obj) + + _obj = UpdateFeedbackCommentParam.parse_obj({ + "body": obj.get("body") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/update_feedback_param.py b/saasus_sdk_python/src/communication/models/update_feedback_param.py new file mode 100644 index 0000000..fd502ba --- /dev/null +++ b/saasus_sdk_python/src/communication/models/update_feedback_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateFeedbackParam(BaseModel): + """ + UpdateFeedbackParam + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + __properties = ["feedback_title", "feedback_description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateFeedbackParam: + """Create an instance of UpdateFeedbackParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateFeedbackParam: + """Create an instance of UpdateFeedbackParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateFeedbackParam.parse_obj(obj) + + _obj = UpdateFeedbackParam.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/update_feedback_status_param.py b/saasus_sdk_python/src/communication/models/update_feedback_status_param.py new file mode 100644 index 0000000..9b0e513 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/update_feedback_status_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt + +class UpdateFeedbackStatusParam(BaseModel): + """ + UpdateFeedbackStatusParam + """ + status: StrictInt = Field(...) + __properties = ["status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateFeedbackStatusParam: + """Create an instance of UpdateFeedbackStatusParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateFeedbackStatusParam: + """Create an instance of UpdateFeedbackStatusParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateFeedbackStatusParam.parse_obj(obj) + + _obj = UpdateFeedbackStatusParam.parse_obj({ + "status": obj.get("status") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/user.py b/saasus_sdk_python/src/communication/models/user.py new file mode 100644 index 0000000..630655f --- /dev/null +++ b/saasus_sdk_python/src/communication/models/user.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class User(BaseModel): + """ + User + """ + user_id: StrictStr = Field(...) + __properties = ["user_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> User: + """Create an instance of User from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> User: + """Create an instance of User from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return User.parse_obj(obj) + + _obj = User.parse_obj({ + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/users.py b/saasus_sdk_python/src/communication/models/users.py new file mode 100644 index 0000000..388a869 --- /dev/null +++ b/saasus_sdk_python/src/communication/models/users.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.communication.models.user import User +from typing_extensions import Annotated + +class Users(BaseModel): + """ + Users + """ + users: Annotated[List[User], Field()] = Field(...) + __properties = ["users"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Users: + """Create an instance of Users from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Users: + """Create an instance of Users from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Users.parse_obj(obj) + + _obj = Users.parse_obj({ + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/models/votes.py b/saasus_sdk_python/src/communication/models/votes.py new file mode 100644 index 0000000..16b60bc --- /dev/null +++ b/saasus_sdk_python/src/communication/models/votes.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt +from saasus_sdk_python.src.communication.models.user import User +from typing_extensions import Annotated + +class Votes(BaseModel): + """ + Votes + """ + users: Annotated[List[User], Field()] = Field(...) + count: StrictInt = Field(...) + __properties = ["users", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Votes: + """Create an instance of Votes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Votes: + """Create an instance of Votes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Votes.parse_obj(obj) + + _obj = Votes.parse_obj({ + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None, + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/communication/py.typed b/saasus_sdk_python/src/communication/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/saasus_sdk_python/src/communication/rest.py b/saasus_sdk_python/src/communication/rest.py new file mode 100644 index 0000000..0812066 --- /dev/null +++ b/saasus_sdk_python/src/communication/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.communication.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/saasus_sdk_python/src/integration/__init__.py b/saasus_sdk_python/src/integration/__init__.py new file mode 100644 index 0000000..37c110e --- /dev/null +++ b/saasus_sdk_python/src/integration/__init__.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.integration.api.error_api import ErrorApi +from saasus_sdk_python.src.integration.api.event_bridge_api import EventBridgeApi + +# import ApiClient +from saasus_sdk_python.src.integration.api_response import ApiResponse +from saasus_sdk_python.src.integration.api_client import ApiClient +from saasus_sdk_python.src.integration.configuration import Configuration +from saasus_sdk_python.src.integration.exceptions import OpenApiException +from saasus_sdk_python.src.integration.exceptions import ApiTypeError +from saasus_sdk_python.src.integration.exceptions import ApiValueError +from saasus_sdk_python.src.integration.exceptions import ApiKeyError +from saasus_sdk_python.src.integration.exceptions import ApiAttributeError +from saasus_sdk_python.src.integration.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.integration.models.aws_region import AwsRegion +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.models.error import Error +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.models.event_message import EventMessage diff --git a/saasus_sdk_python/src/integration/api/__init__.py b/saasus_sdk_python/src/integration/api/__init__.py new file mode 100644 index 0000000..f8d8973 --- /dev/null +++ b/saasus_sdk_python/src/integration/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.integration.api.error_api import ErrorApi +from saasus_sdk_python.src.integration.api.event_bridge_api import EventBridgeApi + diff --git a/saasus_sdk_python/src/integration/api/error_api.py b/saasus_sdk_python/src/integration/api/error_api.py new file mode 100644 index 0000000..cda9f6f --- /dev/null +++ b/saasus_sdk_python/src/integration/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.integration.api_client import ApiClient +from saasus_sdk_python.src.integration.api_response import ApiResponse +from saasus_sdk_python.src.integration.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/integration/api/event_bridge_api.py b/saasus_sdk_python/src/integration/api/event_bridge_api.py new file mode 100644 index 0000000..e15b120 --- /dev/null +++ b/saasus_sdk_python/src/integration/api/event_bridge_api.py @@ -0,0 +1,723 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +from saasus_sdk_python.src.integration.api_client import ApiClient +from saasus_sdk_python.src.integration.api_response import ApiResponse +from saasus_sdk_python.src.integration.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EventBridgeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_event_bridge_event(self, create_event_bridge_event_param : Optional[CreateEventBridgeEventParam] = None, **kwargs) -> None: # noqa: E501 + """Send Events # noqa: E501 + + Send events to Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_event(create_event_bridge_event_param, async_req=True) + >>> result = thread.get() + + :param create_event_bridge_event_param: + :type create_event_bridge_event_param: CreateEventBridgeEventParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_event_bridge_event_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_event_bridge_event_with_http_info(create_event_bridge_event_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_event_bridge_event_with_http_info(self, create_event_bridge_event_param : Optional[CreateEventBridgeEventParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Send Events # noqa: E501 + + Send events to Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_event_with_http_info(create_event_bridge_event_param, async_req=True) + >>> result = thread.get() + + :param create_event_bridge_event_param: + :type create_event_bridge_event_param: CreateEventBridgeEventParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'create_event_bridge_event_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_event_bridge_event" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_event_bridge_event_param'] is not None: + _body_params = _params['create_event_bridge_event_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/event', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_event_bridge_test_event(self, **kwargs) -> None: # noqa: E501 + """Test EventBridge Connection # noqa: E501 + + Send events to test the connection with Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_test_event(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_event_bridge_test_event_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_event_bridge_test_event_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_event_bridge_test_event_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Test EventBridge Connection # noqa: E501 + + Send events to test the connection with Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_test_event_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_event_bridge_test_event" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/test-event', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_event_bridge_settings(self, **kwargs) -> None: # noqa: E501 + """Delete EventBridge Settings # noqa: E501 + + Delete settings used to provide host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_event_bridge_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_event_bridge_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_event_bridge_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_event_bridge_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete EventBridge Settings # noqa: E501 + + Delete settings used to provide host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_event_bridge_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_event_bridge_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/info', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_event_bridge_settings(self, **kwargs) -> EventBridgeSettings: # noqa: E501 + """Get EventBridge Settings # noqa: E501 + + Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_event_bridge_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: EventBridgeSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_event_bridge_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_event_bridge_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_event_bridge_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get EventBridge Settings # noqa: E501 + + Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_event_bridge_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(EventBridgeSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_event_bridge_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "EventBridgeSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/eventbridge/info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def save_event_bridge_settings(self, body : Optional[EventBridgeSettings] = None, **kwargs) -> None: # noqa: E501 + """Update EventBridge Settings # noqa: E501 + + Update configuration used to provide the host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_event_bridge_settings(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: EventBridgeSettings + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the save_event_bridge_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.save_event_bridge_settings_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def save_event_bridge_settings_with_http_info(self, body : Optional[EventBridgeSettings] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update EventBridge Settings # noqa: E501 + + Update configuration used to provide the host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_event_bridge_settings_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: EventBridgeSettings + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method save_event_bridge_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/integration/api_client.py b/saasus_sdk_python/src/integration/api_client.py new file mode 100644 index 0000000..4206c38 --- /dev/null +++ b/saasus_sdk_python/src/integration/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.integration.configuration import Configuration +from saasus_sdk_python.src.integration.api_response import ApiResponse +import saasus_sdk_python.src.integration.models +from saasus_sdk_python.src.integration import rest +from saasus_sdk_python.src.integration.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.integration.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/src/integration/api_response.py b/saasus_sdk_python/src/integration/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/saasus_sdk_python/src/integration/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/saasus_sdk_python/src/integration/configuration.py b/saasus_sdk_python/src/integration/configuration.py new file mode 100644 index 0000000..16008f7 --- /dev/null +++ b/saasus_sdk_python/src/integration/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.integration.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/integration" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.integration") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/integration", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/integration/exceptions.py b/saasus_sdk_python/src/integration/exceptions.py new file mode 100644 index 0000000..aa9fde7 --- /dev/null +++ b/saasus_sdk_python/src/integration/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/integration/models/__init__.py b/saasus_sdk_python/src/integration/models/__init__.py new file mode 100644 index 0000000..d55a2f5 --- /dev/null +++ b/saasus_sdk_python/src/integration/models/__init__.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.integration.models.aws_region import AwsRegion +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.models.error import Error +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.models.event_message import EventMessage diff --git a/saasus_sdk_python/src/integration/models/aws_region.py b/saasus_sdk_python/src/integration/models/aws_region.py new file mode 100644 index 0000000..e3cb16b --- /dev/null +++ b/saasus_sdk_python/src/integration/models/aws_region.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class AwsRegion(str, Enum): + """ + All AWS regions except Ningxia and Beijing in China can be selected. + """ + + """ + allowed enum values + """ + US_MINUS_EAST_MINUS_1 = 'us-east-1' + US_MINUS_EAST_MINUS_2 = 'us-east-2' + US_MINUS_WEST_MINUS_1 = 'us-west-1' + US_MINUS_WEST_MINUS_2 = 'us-west-2' + AF_MINUS_SOUTH_MINUS_1 = 'af-south-1' + AP_MINUS_EAST_MINUS_1 = 'ap-east-1' + AP_MINUS_SOUTH_MINUS_1 = 'ap-south-1' + AP_MINUS_NORTHEAST_MINUS_1 = 'ap-northeast-1' + AP_MINUS_NORTHEAST_MINUS_2 = 'ap-northeast-2' + AP_MINUS_NORTHEAST_MINUS_3 = 'ap-northeast-3' + AP_MINUS_SOUTHEAST_MINUS_1 = 'ap-southeast-1' + AP_MINUS_SOUTHEAST_MINUS_2 = 'ap-southeast-2' + AP_MINUS_SOUTHEAST_MINUS_3 = 'ap-southeast-3' + CA_MINUS_CENTRAL_MINUS_1 = 'ca-central-1' + EU_MINUS_CENTRAL_MINUS_1 = 'eu-central-1' + EU_MINUS_NORTH_MINUS_1 = 'eu-north-1' + EU_MINUS_SOUTH_MINUS_1 = 'eu-south-1' + EU_MINUS_WEST_MINUS_1 = 'eu-west-1' + EU_MINUS_WEST_MINUS_2 = 'eu-west-2' + EU_MINUS_WEST_MINUS_3 = 'eu-west-3' + ME_MINUS_SOUTH_MINUS_1 = 'me-south-1' + SA_MINUS_EAST_MINUS_1 = 'sa-east-1' + + @classmethod + def from_json(cls, json_str: str) -> AwsRegion: + """Create an instance of AwsRegion from a JSON string""" + return AwsRegion(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/integration/models/create_event_bridge_event_param.py b/saasus_sdk_python/src/integration/models/create_event_bridge_event_param.py new file mode 100644 index 0000000..9bedf93 --- /dev/null +++ b/saasus_sdk_python/src/integration/models/create_event_bridge_event_param.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.integration.models.event_message import EventMessage +from typing_extensions import Annotated + +class CreateEventBridgeEventParam(BaseModel): + """ + CreateEventBridgeEventParam + """ + event_messages: Annotated[List[EventMessage], Field()] = Field(..., description="event message") + __properties = ["event_messages"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateEventBridgeEventParam: + """Create an instance of CreateEventBridgeEventParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in event_messages (list) + _items = [] + if self.event_messages: + for _item in self.event_messages: + if _item: + _items.append(_item.to_dict()) + _dict['event_messages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateEventBridgeEventParam: + """Create an instance of CreateEventBridgeEventParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateEventBridgeEventParam.parse_obj(obj) + + _obj = CreateEventBridgeEventParam.parse_obj({ + "event_messages": [EventMessage.from_dict(_item) for _item in obj.get("event_messages")] if obj.get("event_messages") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/integration/models/error.py b/saasus_sdk_python/src/integration/models/error.py new file mode 100644 index 0000000..eac824c --- /dev/null +++ b/saasus_sdk_python/src/integration/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/integration/models/event_bridge_settings.py b/saasus_sdk_python/src/integration/models/event_bridge_settings.py new file mode 100644 index 0000000..4de9811 --- /dev/null +++ b/saasus_sdk_python/src/integration/models/event_bridge_settings.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.integration.models.aws_region import AwsRegion + +class EventBridgeSettings(BaseModel): + """ + EventBridgeSettings + """ + aws_account_id: StrictStr = Field(..., description="AWS Account ID") + aws_region: AwsRegion = Field(...) + __properties = ["aws_account_id", "aws_region"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> EventBridgeSettings: + """Create an instance of EventBridgeSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> EventBridgeSettings: + """Create an instance of EventBridgeSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return EventBridgeSettings.parse_obj(obj) + + _obj = EventBridgeSettings.parse_obj({ + "aws_account_id": obj.get("aws_account_id"), + "aws_region": obj.get("aws_region") + }) + return _obj + + diff --git a/saasus_sdk_python/src/integration/models/event_message.py b/saasus_sdk_python/src/integration/models/event_message.py new file mode 100644 index 0000000..27bf30d --- /dev/null +++ b/saasus_sdk_python/src/integration/models/event_message.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class EventMessage(BaseModel): + """ + EventMessage + """ + event_type: StrictStr = Field(..., description="event type") + event_detail_type: StrictStr = Field(..., description="detailed event type") + message: StrictStr = Field(..., description="event message") + __properties = ["event_type", "event_detail_type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> EventMessage: + """Create an instance of EventMessage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> EventMessage: + """Create an instance of EventMessage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return EventMessage.parse_obj(obj) + + _obj = EventMessage.parse_obj({ + "event_type": obj.get("event_type"), + "event_detail_type": obj.get("event_detail_type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/integration/py.typed b/saasus_sdk_python/src/integration/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/saasus_sdk_python/src/integration/rest.py b/saasus_sdk_python/src/integration/rest.py new file mode 100644 index 0000000..3361edd --- /dev/null +++ b/saasus_sdk_python/src/integration/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.integration.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/saasus_sdk_python/src/pricing/__init__.py b/saasus_sdk_python/src/pricing/__init__.py new file mode 100644 index 0000000..8b225a9 --- /dev/null +++ b/saasus_sdk_python/src/pricing/__init__.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.pricing.api.error_api import ErrorApi +from saasus_sdk_python.src.pricing.api.metering_api import MeteringApi +from saasus_sdk_python.src.pricing.api.pricing_menus_api import PricingMenusApi +from saasus_sdk_python.src.pricing.api.pricing_plans_api import PricingPlansApi +from saasus_sdk_python.src.pricing.api.pricing_units_api import PricingUnitsApi +from saasus_sdk_python.src.pricing.api.tax_rate_api import TaxRateApi + +# import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.configuration import Configuration +from saasus_sdk_python.src.pricing.exceptions import OpenApiException +from saasus_sdk_python.src.pricing.exceptions import ApiTypeError +from saasus_sdk_python.src.pricing.exceptions import ApiValueError +from saasus_sdk_python.src.pricing.exceptions import ApiKeyError +from saasus_sdk_python.src.pricing.exceptions import ApiAttributeError +from saasus_sdk_python.src.pricing.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.error import Error +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam diff --git a/saasus_sdk_python/src/pricing/api/__init__.py b/saasus_sdk_python/src/pricing/api/__init__.py new file mode 100644 index 0000000..546a6f4 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/__init__.py @@ -0,0 +1,10 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.pricing.api.error_api import ErrorApi +from saasus_sdk_python.src.pricing.api.metering_api import MeteringApi +from saasus_sdk_python.src.pricing.api.pricing_menus_api import PricingMenusApi +from saasus_sdk_python.src.pricing.api.pricing_plans_api import PricingPlansApi +from saasus_sdk_python.src.pricing.api.pricing_units_api import PricingUnitsApi +from saasus_sdk_python.src.pricing.api.tax_rate_api import TaxRateApi + diff --git a/saasus_sdk_python/src/pricing/api/error_api.py b/saasus_sdk_python/src/pricing/api/error_api.py new file mode 100644 index 0000000..3aabbb0 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/pricing/api/metering_api.py b/saasus_sdk_python/src/pricing/api/metering_api.py new file mode 100644 index 0000000..f189dfb --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/metering_api.py @@ -0,0 +1,2180 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MeteringApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_metering_unit(self, body : Optional[MeteringUnitProps] = None, **kwargs) -> MeteringUnit: # noqa: E501 + """Create Metering Unit # noqa: E501 + + Create a metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_metering_unit(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnit + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_metering_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_metering_unit_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_metering_unit_with_http_info(self, body : Optional[MeteringUnitProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Metering Unit # noqa: E501 + + Create a metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_metering_unit_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnit, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_metering_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "MeteringUnit", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/units', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_metering_unit_by_id(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], **kwargs) -> None: # noqa: E501 + """Delete Metering Unit # noqa: E501 + + Delete metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_by_id(metering_unit_id, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_metering_unit_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_metering_unit_by_id_with_http_info(metering_unit_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_metering_unit_by_id_with_http_info(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Metering Unit # noqa: E501 + + Delete metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_by_id_with_http_info(metering_unit_id, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'metering_unit_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_metering_unit_by_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['metering_unit_id']: + _path_params['metering_unit_id'] = _params['metering_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/metering/units/{metering_unit_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_metering_unit_timestamp_count(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], **kwargs) -> None: # noqa: E501 + """Delete Metering Unit Count for Specified Timestamp # noqa: E501 + + Deletes metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_metering_unit_timestamp_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, **kwargs) # noqa: E501 + + @validate_arguments + def delete_metering_unit_timestamp_count_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Metering Unit Count for Specified Timestamp # noqa: E501 + + Deletes metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'timestamp' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_metering_unit_timestamp_count" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['timestamp']: + _path_params['timestamp'] = _params['timestamp'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> MeteringUnitDateCount: # noqa: E501 + """Get Metering Unit Count for Specific Date # noqa: E501 + + Gets the metering unit count for a specific date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDateCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info(tenant_id, metering_unit_name, var_date, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Metering Unit Count for Specific Date # noqa: E501 + + Gets the metering unit count for a specific date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info(tenant_id, metering_unit_name, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDateCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'var_date' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['var_date']: + _path_params['date'] = _params['var_date'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDateCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], start_timestamp : Annotated[Optional[StrictInt], Field(description="Start Date-Time")] = None, end_timestamp : Annotated[Optional[StrictInt], Field(description="End Date-Time")] = None, **kwargs) -> MeteringUnitDatePeriodCounts: # noqa: E501 + """Obtain metering unit counts for a specified date/time period # noqa: E501 + + Obtain metering unit counts for a specified date/time period. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp, end_timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param start_timestamp: Start Date-Time + :type start_timestamp: int + :param end_timestamp: End Date-Time + :type end_timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDatePeriodCounts + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info(tenant_id, metering_unit_name, start_timestamp, end_timestamp, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], start_timestamp : Annotated[Optional[StrictInt], Field(description="Start Date-Time")] = None, end_timestamp : Annotated[Optional[StrictInt], Field(description="End Date-Time")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Obtain metering unit counts for a specified date/time period # noqa: E501 + + Obtain metering unit counts for a specified date/time period. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info(tenant_id, metering_unit_name, start_timestamp, end_timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param start_timestamp: Start Date-Time + :type start_timestamp: int + :param end_timestamp: End Date-Time + :type end_timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDatePeriodCounts, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'start_timestamp', + 'end_timestamp' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + if _params.get('start_timestamp') is not None: # noqa: E501 + _query_params.append(('start_timestamp', _params['start_timestamp'])) + + if _params.get('end_timestamp') is not None: # noqa: E501 + _query_params.append(('end_timestamp', _params['end_timestamp'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDatePeriodCounts", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_today(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> MeteringUnitDateCount: # noqa: E501 + """Get Metering Unit Count for the Current Day # noqa: E501 + + Get the metering unit count for the current day. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDateCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info(tenant_id, metering_unit_name, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Metering Unit Count for the Current Day # noqa: E501 + + Get the metering unit count for the current day. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDateCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_count_by_tenant_id_and_unit_name_today" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDateCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/today', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_counts_by_tenant_id_and_date(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> MeteringUnitDateCounts: # noqa: E501 + """Get All Metering Unit Counts for a Specified Date # noqa: E501 + + Gets the total metering unit count for the specified date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDateCounts + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info(tenant_id, var_date, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> ApiResponse: # noqa: E501 + """Get All Metering Unit Counts for a Specified Date # noqa: E501 + + Gets the total metering unit count for the specified date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info(tenant_id, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDateCounts, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'var_date' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_counts_by_tenant_id_and_date" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['var_date']: + _path_params['date'] = _params['var_date'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDateCounts", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/date/{date}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> MeteringUnitMonthCount: # noqa: E501 + """Get the Metering Unit Count for the Specified Month # noqa: E501 + + Gets the metering unit count for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitMonthCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info(tenant_id, metering_unit_name, month, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> ApiResponse: # noqa: E501 + """Get the Metering Unit Count for the Specified Month # noqa: E501 + + Gets the metering unit count for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info(tenant_id, metering_unit_name, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitMonthCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'month' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['month']: + _path_params['month'] = _params['month'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitMonthCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> MeteringUnitMonthCount: # noqa: E501 + """Get Metering Unit Count for the Current Month # noqa: E501 + + Get the metering unit count for the current month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitMonthCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info(tenant_id, metering_unit_name, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Metering Unit Count for the Current Month # noqa: E501 + + Get the metering unit count for the current month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitMonthCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitMonthCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_month_counts_by_tenant_id_and_month(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> MeteringUnitMonthCounts: # noqa: E501 + """Get All Metering Unit Counts for the Specified Month # noqa: E501 + + Gets all metering unit counts for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitMonthCounts + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info(tenant_id, month, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> ApiResponse: # noqa: E501 + """Get All Metering Unit Counts for the Specified Month # noqa: E501 + + Gets all metering unit counts for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info(tenant_id, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitMonthCounts, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'month' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_month_counts_by_tenant_id_and_month" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['month']: + _path_params['month'] = _params['month'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitMonthCounts", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/month/{month}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_units(self, **kwargs) -> MeteringUnits: # noqa: E501 + """Get all metering units # noqa: E501 + + Get all metering units. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_units(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnits + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_units_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_units_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_metering_units_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get all metering units # noqa: E501 + + Get all metering units. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_units_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnits, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_units" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnits", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/units', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_metering_unit_by_id(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], body : Optional[MeteringUnitProps] = None, **kwargs) -> None: # noqa: E501 + """Update Metering Unit # noqa: E501 + + Update metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_by_id(metering_unit_id, body, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_metering_unit_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_metering_unit_by_id_with_http_info(metering_unit_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_metering_unit_by_id_with_http_info(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], body : Optional[MeteringUnitProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Metering Unit # noqa: E501 + + Update metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_by_id_with_http_info(metering_unit_id, body, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'metering_unit_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_metering_unit_by_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['metering_unit_id']: + _path_params['metering_unit_id'] = _params['metering_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/metering/units/{metering_unit_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_metering_unit_timestamp_count(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], update_metering_unit_timestamp_count_param : Optional[UpdateMeteringUnitTimestampCountParam] = None, **kwargs) -> MeteringUnitTimestampCount: # noqa: E501 + """Update Metering Unit Count for Specified Timestamp # noqa: E501 + + Update metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param update_metering_unit_timestamp_count_param: + :type update_metering_unit_timestamp_count_param: UpdateMeteringUnitTimestampCountParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitTimestampCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_metering_unit_timestamp_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_metering_unit_timestamp_count_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], update_metering_unit_timestamp_count_param : Optional[UpdateMeteringUnitTimestampCountParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Metering Unit Count for Specified Timestamp # noqa: E501 + + Update metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param update_metering_unit_timestamp_count_param: + :type update_metering_unit_timestamp_count_param: UpdateMeteringUnitTimestampCountParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitTimestampCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'timestamp', + 'update_metering_unit_timestamp_count_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_metering_unit_timestamp_count" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['timestamp']: + _path_params['timestamp'] = _params['timestamp'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_metering_unit_timestamp_count_param'] is not None: + _body_params = _params['update_metering_unit_timestamp_count_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitTimestampCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_metering_unit_timestamp_count_now(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], update_metering_unit_timestamp_count_now_param : Optional[UpdateMeteringUnitTimestampCountNowParam] = None, **kwargs) -> MeteringUnitTimestampCount: # noqa: E501 + """Update Metering Unit Count for Current Time # noqa: E501 + + Update the metering unit count for the current time. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param update_metering_unit_timestamp_count_now_param: + :type update_metering_unit_timestamp_count_now_param: UpdateMeteringUnitTimestampCountNowParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitTimestampCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_metering_unit_timestamp_count_now_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_metering_unit_timestamp_count_now_with_http_info(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_metering_unit_timestamp_count_now_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], update_metering_unit_timestamp_count_now_param : Optional[UpdateMeteringUnitTimestampCountNowParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Metering Unit Count for Current Time # noqa: E501 + + Update the metering unit count for the current time. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count_now_with_http_info(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param update_metering_unit_timestamp_count_now_param: + :type update_metering_unit_timestamp_count_now_param: UpdateMeteringUnitTimestampCountNowParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitTimestampCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'update_metering_unit_timestamp_count_now_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_metering_unit_timestamp_count_now" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_metering_unit_timestamp_count_now_param'] is not None: + _body_params = _params['update_metering_unit_timestamp_count_now_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitTimestampCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/now', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/pricing/api/pricing_menus_api.py b/saasus_sdk_python/src/pricing/api/pricing_menus_api.py new file mode 100644 index 0000000..7c23481 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/pricing_menus_api.py @@ -0,0 +1,756 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PricingMenusApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_pricing_menu(self, body : Optional[SavePricingMenuParam] = None, **kwargs) -> PricingMenu: # noqa: E501 + """Create a Pricing Feature Menu # noqa: E501 + + Create a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_menu(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingMenu + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_pricing_menu_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_pricing_menu_with_http_info(self, body : Optional[SavePricingMenuParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create a Pricing Feature Menu # noqa: E501 + + Create a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_menu_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingMenu, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "PricingMenu", + '500': "Error", + } + + return self.api_client.call_api( + '/menus', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_pricing_menu(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> None: # noqa: E501 + """Delete Pricing Feature Menu # noqa: E501 + + Delete pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_menu(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_pricing_menu_with_http_info(menu_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_pricing_menu_with_http_info(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Pricing Feature Menu # noqa: E501 + + Delete pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_menu_with_http_info(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'menu_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['menu_id']: + _path_params['menu_id'] = _params['menu_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/menus/{menu_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_menu(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> PricingMenu: # noqa: E501 + """Get Pricing Feature Menu # noqa: E501 + + Get a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menu(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingMenu + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_menu_with_http_info(menu_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_menu_with_http_info(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Feature Menu # noqa: E501 + + Get a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menu_with_http_info(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingMenu, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'menu_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['menu_id']: + _path_params['menu_id'] = _params['menu_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingMenu", + '500': "Error", + } + + return self.api_client.call_api( + '/menus/{menu_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_menus(self, **kwargs) -> PricingMenus: # noqa: E501 + """Get Pricing Feature Menus # noqa: E501 + + Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menus(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingMenus + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_menus_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_menus_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_menus_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Feature Menus # noqa: E501 + + Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menus_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingMenus, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_menus" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingMenus", + '500': "Error", + } + + return self.api_client.call_api( + '/menus', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_menu(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], body : Optional[SavePricingMenuParam] = None, **kwargs) -> None: # noqa: E501 + """Update Pricing Feature Menu # noqa: E501 + + Update pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_menu(menu_id, body, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_menu_with_http_info(menu_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_menu_with_http_info(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], body : Optional[SavePricingMenuParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Pricing Feature Menu # noqa: E501 + + Update pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_menu_with_http_info(menu_id, body, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'menu_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['menu_id']: + _path_params['menu_id'] = _params['menu_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/menus/{menu_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/pricing/api/pricing_plans_api.py b/saasus_sdk_python/src/pricing/api/pricing_plans_api.py new file mode 100644 index 0000000..a413950 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/pricing_plans_api.py @@ -0,0 +1,1288 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PricingPlansApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_pricing_plan(self, body : Optional[SavePricingPlanParam] = None, **kwargs) -> PricingPlan: # noqa: E501 + """Create Pricing Plan # noqa: E501 + + Create a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_plan(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingPlan + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_pricing_plan_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_pricing_plan_with_http_info(self, body : Optional[SavePricingPlanParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Pricing Plan # noqa: E501 + + Create a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_plan_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingPlan, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "PricingPlan", + '500': "Error", + } + + return self.api_client.call_api( + '/plans', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_all_plans_and_menus_and_units_and_meters_and_tax_rates(self, **kwargs) -> None: # noqa: E501 + """Delete all Plans, Menus, Units, Meters and Tax Rates # noqa: E501 + + Unconditionally remove all rate plans, menus, units, meters and tax rates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete all Plans, Menus, Units, Meters and Tax Rates # noqa: E501 + + Unconditionally remove all rate plans, menus, units, meters and tax rates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_plans_and_menus_and_units_and_meters_and_tax_rates" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans-initialization', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_pricing_plan(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> None: # noqa: E501 + """Delete Pricing Plan # noqa: E501 + + Delete a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_plan(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_pricing_plan_with_http_info(plan_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_pricing_plan_with_http_info(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Pricing Plan # noqa: E501 + + Delete a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_plan_with_http_info(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'plan_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_id']: + _path_params['plan_id'] = _params['plan_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/{plan_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_stripe_plan(self, **kwargs) -> None: # noqa: E501 + """Delete Product Data from Stripe # noqa: E501 + + Delete product data from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_plan(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_stripe_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_stripe_plan_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_stripe_plan_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Product Data from Stripe # noqa: E501 + + Delete product data from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_plan_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stripe_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_plan(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> PricingPlan: # noqa: E501 + """Get Pricing Plan # noqa: E501 + + Get a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plan(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingPlan + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_plan_with_http_info(plan_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_plan_with_http_info(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Plan # noqa: E501 + + Get a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plan_with_http_info(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingPlan, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'plan_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_id']: + _path_params['plan_id'] = _params['plan_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingPlan", + '500': "Error", + } + + return self.api_client.call_api( + '/plans/{plan_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_plans(self, **kwargs) -> PricingPlans: # noqa: E501 + """Get Pricing Plans # noqa: E501 + + Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plans(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingPlans + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_plans_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_plans_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_plans_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Plans # noqa: E501 + + Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingPlans, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_plans" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingPlans", + '500': "Error", + } + + return self.api_client.call_api( + '/plans', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def link_plan_to_stripe(self, **kwargs) -> None: # noqa: E501 + """Connect to Stripe # noqa: E501 + + Connect information to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_plan_to_stripe(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the link_plan_to_stripe_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.link_plan_to_stripe_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def link_plan_to_stripe_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Connect to Stripe # noqa: E501 + + Connect information to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_plan_to_stripe_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method link_plan_to_stripe" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/init', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_plan(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], body : Optional[SavePricingPlanParam] = None, **kwargs) -> None: # noqa: E501 + """Update Pricing Plan # noqa: E501 + + Update a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plan(plan_id, body, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_plan_with_http_info(plan_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_plan_with_http_info(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], body : Optional[SavePricingPlanParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Pricing Plan # noqa: E501 + + Update a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plan_with_http_info(plan_id, body, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'plan_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_id']: + _path_params['plan_id'] = _params['plan_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/{plan_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_plans_used(self, update_pricing_plans_used_param : Optional[UpdatePricingPlansUsedParam] = None, **kwargs) -> None: # noqa: E501 + """Update Used Flag # noqa: E501 + + Update price plan and feature menu/pricing unit to used. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plans_used(update_pricing_plans_used_param, async_req=True) + >>> result = thread.get() + + :param update_pricing_plans_used_param: + :type update_pricing_plans_used_param: UpdatePricingPlansUsedParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_plans_used_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_plans_used_with_http_info(update_pricing_plans_used_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_plans_used_with_http_info(self, update_pricing_plans_used_param : Optional[UpdatePricingPlansUsedParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Used Flag # noqa: E501 + + Update price plan and feature menu/pricing unit to used. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plans_used_with_http_info(update_pricing_plans_used_param, async_req=True) + >>> result = thread.get() + + :param update_pricing_plans_used_param: + :type update_pricing_plans_used_param: UpdatePricingPlansUsedParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_pricing_plans_used_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_plans_used" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_pricing_plans_used_param'] is not None: + _body_params = _params['update_pricing_plans_used_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/used', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/pricing/api/pricing_units_api.py b/saasus_sdk_python/src/pricing/api/pricing_units_api.py new file mode 100644 index 0000000..37252f9 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/pricing_units_api.py @@ -0,0 +1,756 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PricingUnitsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_pricing_unit(self, body : Optional[PricingUnitForSave] = None, **kwargs) -> PricingUnit: # noqa: E501 + """Create Pricing Unit # noqa: E501 + + Create a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_unit(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingUnit + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_pricing_unit_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_pricing_unit_with_http_info(self, body : Optional[PricingUnitForSave] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Pricing Unit # noqa: E501 + + Create a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_unit_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingUnit, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "PricingUnit", + '500': "Error", + } + + return self.api_client.call_api( + '/units', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_pricing_unit(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> None: # noqa: E501 + """Delete Pricing Unit # noqa: E501 + + Delete a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_unit(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_pricing_unit_with_http_info(pricing_unit_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_pricing_unit_with_http_info(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Pricing Unit # noqa: E501 + + Delete a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_unit_with_http_info(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'pricing_unit_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['pricing_unit_id']: + _path_params['pricing_unit_id'] = _params['pricing_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/units/{pricing_unit_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_unit(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> PricingUnit: # noqa: E501 + """Get Pricing Unit # noqa: E501 + + Get a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_unit(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingUnit + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_unit_with_http_info(pricing_unit_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_unit_with_http_info(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Unit # noqa: E501 + + Get a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_unit_with_http_info(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingUnit, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'pricing_unit_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['pricing_unit_id']: + _path_params['pricing_unit_id'] = _params['pricing_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingUnit", + '500': "Error", + } + + return self.api_client.call_api( + '/units/{pricing_unit_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_units(self, **kwargs) -> PricingUnits: # noqa: E501 + """Get Pricing Units # noqa: E501 + + Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_units(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingUnits + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_units_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_units_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_units_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Units # noqa: E501 + + Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_units_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingUnits, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_units" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingUnits", + '500': "Error", + } + + return self.api_client.call_api( + '/units', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_unit(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], body : Optional[PricingUnitForSave] = None, **kwargs) -> None: # noqa: E501 + """Update Pricing Unit # noqa: E501 + + Update pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_unit(pricing_unit_id, body, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_unit_with_http_info(pricing_unit_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_unit_with_http_info(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], body : Optional[PricingUnitForSave] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Pricing Unit # noqa: E501 + + Update pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_unit_with_http_info(pricing_unit_id, body, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'pricing_unit_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['pricing_unit_id']: + _path_params['pricing_unit_id'] = _params['pricing_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/units/{pricing_unit_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/pricing/api/tax_rate_api.py b/saasus_sdk_python/src/pricing/api/tax_rate_api.py new file mode 100644 index 0000000..a6d04a0 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api/tax_rate_api.py @@ -0,0 +1,481 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TaxRateApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tax_rate(self, body : Optional[TaxRateProps] = None, **kwargs) -> TaxRate: # noqa: E501 + """Create Tax Rate # noqa: E501 + + Creates a tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tax_rate(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TaxRateProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TaxRate + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tax_rate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tax_rate_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_tax_rate_with_http_info(self, body : Optional[TaxRateProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tax Rate # noqa: E501 + + Creates a tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tax_rate_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TaxRateProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TaxRate, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tax_rate" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "TaxRate", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tax-rates', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tax_rates(self, **kwargs) -> TaxRates: # noqa: E501 + """Get Tax Rates # noqa: E501 + + Get all Tax Rates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tax_rates(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TaxRates + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tax_rates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tax_rates_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_tax_rates_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Tax Rates # noqa: E501 + + Get all Tax Rates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tax_rates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TaxRates, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tax_rates" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TaxRates", + '500': "Error", + } + + return self.api_client.call_api( + '/tax-rates', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tax_rate(self, tax_rate_id : Annotated[StrictStr, Field(..., description="Tax Rate ID")], update_tax_rate_param : Optional[UpdateTaxRateParam] = None, **kwargs) -> None: # noqa: E501 + """Update Tax Rate # noqa: E501 + + Update tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tax_rate(tax_rate_id, update_tax_rate_param, async_req=True) + >>> result = thread.get() + + :param tax_rate_id: Tax Rate ID (required) + :type tax_rate_id: str + :param update_tax_rate_param: + :type update_tax_rate_param: UpdateTaxRateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tax_rate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tax_rate_with_http_info(tax_rate_id, update_tax_rate_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_tax_rate_with_http_info(self, tax_rate_id : Annotated[StrictStr, Field(..., description="Tax Rate ID")], update_tax_rate_param : Optional[UpdateTaxRateParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tax Rate # noqa: E501 + + Update tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tax_rate_with_http_info(tax_rate_id, update_tax_rate_param, async_req=True) + >>> result = thread.get() + + :param tax_rate_id: Tax Rate ID (required) + :type tax_rate_id: str + :param update_tax_rate_param: + :type update_tax_rate_param: UpdateTaxRateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tax_rate_id', + 'update_tax_rate_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tax_rate" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tax_rate_id']: + _path_params['tax_rate_id'] = _params['tax_rate_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_tax_rate_param'] is not None: + _body_params = _params['update_tax_rate_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tax-rates/{tax_rate_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/saasus_sdk_python/src/pricing/api_client.py b/saasus_sdk_python/src/pricing/api_client.py new file mode 100644 index 0000000..53c85f2 --- /dev/null +++ b/saasus_sdk_python/src/pricing/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.pricing.configuration import Configuration +from saasus_sdk_python.src.pricing.api_response import ApiResponse +import saasus_sdk_python.src.pricing.models +from saasus_sdk_python.src.pricing import rest +from saasus_sdk_python.src.pricing.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.pricing.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/saasus_sdk_python/src/pricing/api_response.py b/saasus_sdk_python/src/pricing/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/saasus_sdk_python/src/pricing/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/saasus_sdk_python/src/pricing/configuration.py b/saasus_sdk_python/src/pricing/configuration.py new file mode 100644 index 0000000..ba4134c --- /dev/null +++ b/saasus_sdk_python/src/pricing/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.pricing.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/pricing" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.pricing") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/pricing", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/saasus_sdk_python/src/pricing/exceptions.py b/saasus_sdk_python/src/pricing/exceptions.py new file mode 100644 index 0000000..41c7737 --- /dev/null +++ b/saasus_sdk_python/src/pricing/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/saasus_sdk_python/src/pricing/models/__init__.py b/saasus_sdk_python/src/pricing/models/__init__.py new file mode 100644 index 0000000..063a4e6 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/__init__.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.error import Error +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam diff --git a/saasus_sdk_python/src/pricing/models/aggregate_usage.py b/saasus_sdk_python/src/pricing/models/aggregate_usage.py new file mode 100644 index 0000000..48757af --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/aggregate_usage.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class AggregateUsage(str, Enum): + """ + Aggregate usage sum: Total usage during the period max: Maximum usage during the period + """ + + """ + allowed enum values + """ + SUM = 'sum' + MAX = 'max' + + @classmethod + def from_json(cls, json_str: str) -> AggregateUsage: + """Create an instance of AggregateUsage from a JSON string""" + return AggregateUsage(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/pricing/models/currency.py b/saasus_sdk_python/src/pricing/models/currency.py new file mode 100644 index 0000000..bfdaa33 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/currency.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class Currency(str, Enum): + """ + Unit of currency + """ + + """ + allowed enum values + """ + JPY = 'JPY' + USD = 'USD' + + @classmethod + def from_json(cls, json_str: str) -> Currency: + """Create an instance of Currency from a JSON string""" + return Currency(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/pricing/models/error.py b/saasus_sdk_python/src/pricing/models/error.py new file mode 100644 index 0000000..a32910e --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="Error type") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit.py b/saasus_sdk_python/src/pricing/models/metering_unit.py new file mode 100644 index 0000000..45907af --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage + +class MeteringUnit(BaseModel): + """ + MeteringUnit + """ + unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + display_name: StrictStr = Field(..., description="Display name") + description: StrictStr = Field(..., description="Description") + id: StrictStr = Field(..., description="Universally Unique Identifier") + used: StrictBool = Field(..., description="Metering unit used settings") + __properties = ["unit_name", "aggregate_usage", "display_name", "description", "id", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnit: + """Create an instance of MeteringUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnit: + """Create an instance of MeteringUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnit.parse_obj(obj) + + _obj = MeteringUnit.parse_obj({ + "unit_name": obj.get("unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "id": obj.get("id"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_count.py b/saasus_sdk_python/src/pricing/models/metering_unit_count.py new file mode 100644 index 0000000..70836ef --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_count.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt + +class MeteringUnitCount(BaseModel): + """ + MeteringUnitCount + """ + timestamp: StrictInt = Field(..., description="Timestamp") + count: StrictInt = Field(..., description="Count") + __properties = ["timestamp", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitCount: + """Create an instance of MeteringUnitCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitCount: + """Create an instance of MeteringUnitCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitCount.parse_obj(obj) + + _obj = MeteringUnitCount.parse_obj({ + "timestamp": obj.get("timestamp"), + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_date_count.py b/saasus_sdk_python/src/pricing/models/metering_unit_date_count.py new file mode 100644 index 0000000..57da20f --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_date_count.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class MeteringUnitDateCount(BaseModel): + """ + MeteringUnitDateCount + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + var_date: StrictStr = Field(..., alias="date", description="Date") + count: StrictInt = Field(..., description="Count") + __properties = ["metering_unit_name", "date", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitDateCount: + """Create an instance of MeteringUnitDateCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitDateCount: + """Create an instance of MeteringUnitDateCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitDateCount.parse_obj(obj) + + _obj = MeteringUnitDateCount.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "var_date": obj.get("date"), + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_date_counts.py b/saasus_sdk_python/src/pricing/models/metering_unit_date_counts.py new file mode 100644 index 0000000..a536599 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_date_counts.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from typing_extensions import Annotated + +class MeteringUnitDateCounts(BaseModel): + """ + MeteringUnitDateCounts + """ + counts: Annotated[List[MeteringUnitDateCount], Field()] = Field(...) + __properties = ["counts"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitDateCounts: + """Create an instance of MeteringUnitDateCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in counts (list) + _items = [] + if self.counts: + for _item in self.counts: + if _item: + _items.append(_item.to_dict()) + _dict['counts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitDateCounts: + """Create an instance of MeteringUnitDateCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitDateCounts.parse_obj(obj) + + _obj = MeteringUnitDateCounts.parse_obj({ + "counts": [MeteringUnitDateCount.from_dict(_item) for _item in obj.get("counts")] if obj.get("counts") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_date_period_counts.py b/saasus_sdk_python/src/pricing/models/metering_unit_date_period_counts.py new file mode 100644 index 0000000..d6eb4bd --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_date_period_counts.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount +from typing_extensions import Annotated + +class MeteringUnitDatePeriodCounts(BaseModel): + """ + MeteringUnitDatePeriodCounts + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + counts: Annotated[List[MeteringUnitCount], Field()] = Field(...) + __properties = ["metering_unit_name", "counts"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitDatePeriodCounts: + """Create an instance of MeteringUnitDatePeriodCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in counts (list) + _items = [] + if self.counts: + for _item in self.counts: + if _item: + _items.append(_item.to_dict()) + _dict['counts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitDatePeriodCounts: + """Create an instance of MeteringUnitDatePeriodCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitDatePeriodCounts.parse_obj(obj) + + _obj = MeteringUnitDatePeriodCounts.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "counts": [MeteringUnitCount.from_dict(_item) for _item in obj.get("counts")] if obj.get("counts") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_month_count.py b/saasus_sdk_python/src/pricing/models/metering_unit_month_count.py new file mode 100644 index 0000000..070e5f9 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_month_count.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class MeteringUnitMonthCount(BaseModel): + """ + MeteringUnitMonthCount + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + month: StrictStr = Field(..., description="Month") + count: StrictInt = Field(..., description="Count") + __properties = ["metering_unit_name", "month", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitMonthCount: + """Create an instance of MeteringUnitMonthCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitMonthCount: + """Create an instance of MeteringUnitMonthCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitMonthCount.parse_obj(obj) + + _obj = MeteringUnitMonthCount.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "month": obj.get("month"), + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_month_counts.py b/saasus_sdk_python/src/pricing/models/metering_unit_month_counts.py new file mode 100644 index 0000000..745213e --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_month_counts.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from typing_extensions import Annotated + +class MeteringUnitMonthCounts(BaseModel): + """ + MeteringUnitMonthCounts + """ + counts: Annotated[List[MeteringUnitMonthCount], Field()] = Field(...) + __properties = ["counts"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitMonthCounts: + """Create an instance of MeteringUnitMonthCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in counts (list) + _items = [] + if self.counts: + for _item in self.counts: + if _item: + _items.append(_item.to_dict()) + _dict['counts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitMonthCounts: + """Create an instance of MeteringUnitMonthCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitMonthCounts.parse_obj(obj) + + _obj = MeteringUnitMonthCounts.parse_obj({ + "counts": [MeteringUnitMonthCount.from_dict(_item) for _item in obj.get("counts")] if obj.get("counts") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_props.py b/saasus_sdk_python/src/pricing/models/metering_unit_props.py new file mode 100644 index 0000000..a10e950 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_props.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage + +class MeteringUnitProps(BaseModel): + """ + MeteringUnitProps + """ + unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + display_name: StrictStr = Field(..., description="Display name") + description: StrictStr = Field(..., description="Description") + __properties = ["unit_name", "aggregate_usage", "display_name", "description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitProps: + """Create an instance of MeteringUnitProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitProps: + """Create an instance of MeteringUnitProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitProps.parse_obj(obj) + + _obj = MeteringUnitProps.parse_obj({ + "unit_name": obj.get("unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "display_name": obj.get("display_name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_unit_timestamp_count.py b/saasus_sdk_python/src/pricing/models/metering_unit_timestamp_count.py new file mode 100644 index 0000000..fdab216 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_unit_timestamp_count.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class MeteringUnitTimestampCount(BaseModel): + """ + MeteringUnitTimestampCount + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + timestamp: StrictInt = Field(..., description="Timestamp") + count: StrictInt = Field(..., description="Count") + __properties = ["metering_unit_name", "timestamp", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitTimestampCount: + """Create an instance of MeteringUnitTimestampCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitTimestampCount: + """Create an instance of MeteringUnitTimestampCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitTimestampCount.parse_obj(obj) + + _obj = MeteringUnitTimestampCount.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "timestamp": obj.get("timestamp"), + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/metering_units.py b/saasus_sdk_python/src/pricing/models/metering_units.py new file mode 100644 index 0000000..5e1553f --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/metering_units.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from typing_extensions import Annotated + +class MeteringUnits(BaseModel): + """ + MeteringUnits + """ + units: Annotated[List[MeteringUnit], Field()] = Field(...) + __properties = ["units"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnits: + """Create an instance of MeteringUnits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnits: + """Create an instance of MeteringUnits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnits.parse_obj(obj) + + _obj = MeteringUnits.parse_obj({ + "units": [MeteringUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_fixed_unit.py b/saasus_sdk_python/src/pricing/models/pricing_fixed_unit.py new file mode 100644 index 0000000..3f2cb9f --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_fixed_unit.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingFixedUnit(BaseModel): + """ + PricingFixedUnit + """ + unit_amount: StrictInt = Field(..., description="Price") + recurring_interval: RecurringInterval = Field(...) + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + used: StrictBool = Field(...) + __properties = ["unit_amount", "recurring_interval", "name", "display_name", "description", "type", "currency", "id", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingFixedUnit: + """Create an instance of PricingFixedUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingFixedUnit: + """Create an instance of PricingFixedUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingFixedUnit.parse_obj(obj) + + _obj = PricingFixedUnit.parse_obj({ + "unit_amount": obj.get("unit_amount"), + "recurring_interval": obj.get("recurring_interval"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "id": obj.get("id"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_fixed_unit_for_save.py b/saasus_sdk_python/src/pricing/models/pricing_fixed_unit_for_save.py new file mode 100644 index 0000000..643095a --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_fixed_unit_for_save.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingFixedUnitForSave(BaseModel): + """ + PricingFixedUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + unit_amount: StrictInt = Field(..., description="Price") + recurring_interval: RecurringInterval = Field(...) + __properties = ["name", "display_name", "description", "type", "currency", "unit_amount", "recurring_interval"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingFixedUnitForSave: + """Create an instance of PricingFixedUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingFixedUnitForSave: + """Create an instance of PricingFixedUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingFixedUnitForSave.parse_obj(obj) + + _obj = PricingFixedUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "unit_amount": obj.get("unit_amount"), + "recurring_interval": obj.get("recurring_interval") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_menu.py b/saasus_sdk_python/src/pricing/models/pricing_menu.py new file mode 100644 index 0000000..f2b0e0b --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_menu.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from typing_extensions import Annotated + +class PricingMenu(BaseModel): + """ + PricingMenu + """ + name: StrictStr = Field(..., description="Menu name") + display_name: StrictStr = Field(..., description="Menu display name") + description: StrictStr = Field(..., description="Menu description") + used: StrictBool = Field(..., description="Menu used settings") + units: Annotated[List[PricingUnit], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + __properties = ["name", "display_name", "description", "used", "units", "id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingMenu: + """Create an instance of PricingMenu from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingMenu: + """Create an instance of PricingMenu from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingMenu.parse_obj(obj) + + _obj = PricingMenu.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used"), + "units": [PricingUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None, + "id": obj.get("id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_menu_props.py b/saasus_sdk_python/src/pricing/models/pricing_menu_props.py new file mode 100644 index 0000000..b88a553 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_menu_props.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from typing_extensions import Annotated + +class PricingMenuProps(BaseModel): + """ + PricingMenuProps + """ + units: Annotated[List[PricingUnit], Field()] = Field(...) + name: StrictStr = Field(..., description="Menu name") + display_name: StrictStr = Field(..., description="Menu display name") + description: StrictStr = Field(..., description="Menu description") + used: StrictBool = Field(..., description="Menu used settings") + __properties = ["units", "name", "display_name", "description", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingMenuProps: + """Create an instance of PricingMenuProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingMenuProps: + """Create an instance of PricingMenuProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingMenuProps.parse_obj(obj) + + _obj = PricingMenuProps.parse_obj({ + "units": [PricingUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None, + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_menus.py b/saasus_sdk_python/src/pricing/models/pricing_menus.py new file mode 100644 index 0000000..369f188 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_menus.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from typing_extensions import Annotated + +class PricingMenus(BaseModel): + """ + PricingMenus + """ + pricing_menus: Annotated[List[PricingMenu], Field()] = Field(...) + __properties = ["pricing_menus"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingMenus: + """Create an instance of PricingMenus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_menus (list) + _items = [] + if self.pricing_menus: + for _item in self.pricing_menus: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_menus'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingMenus: + """Create an instance of PricingMenus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingMenus.parse_obj(obj) + + _obj = PricingMenus.parse_obj({ + "pricing_menus": [PricingMenu.from_dict(_item) for _item in obj.get("pricing_menus")] if obj.get("pricing_menus") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_plan.py b/saasus_sdk_python/src/pricing/models/pricing_plan.py new file mode 100644 index 0000000..b620167 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_plan.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from typing_extensions import Annotated + +class PricingPlan(BaseModel): + """ + PricingPlan + """ + name: StrictStr = Field(..., description="Pricing plan name") + display_name: StrictStr = Field(..., description="Pricing plan display name") + description: StrictStr = Field(..., description="Pricing plan description") + used: StrictBool = Field(..., description="Pricing plan used settings") + pricing_menus: Annotated[List[PricingMenu], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + __properties = ["name", "display_name", "description", "used", "pricing_menus", "id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingPlan: + """Create an instance of PricingPlan from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_menus (list) + _items = [] + if self.pricing_menus: + for _item in self.pricing_menus: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_menus'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingPlan: + """Create an instance of PricingPlan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingPlan.parse_obj(obj) + + _obj = PricingPlan.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used"), + "pricing_menus": [PricingMenu.from_dict(_item) for _item in obj.get("pricing_menus")] if obj.get("pricing_menus") is not None else None, + "id": obj.get("id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_plan_props.py b/saasus_sdk_python/src/pricing/models/pricing_plan_props.py new file mode 100644 index 0000000..b0ae798 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_plan_props.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from typing_extensions import Annotated + +class PricingPlanProps(BaseModel): + """ + PricingPlanProps + """ + pricing_menus: Annotated[List[PricingMenu], Field()] = Field(...) + name: StrictStr = Field(..., description="Pricing plan name") + display_name: StrictStr = Field(..., description="Pricing plan display name") + description: StrictStr = Field(..., description="Pricing plan description") + used: StrictBool = Field(..., description="Pricing plan used settings") + __properties = ["pricing_menus", "name", "display_name", "description", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingPlanProps: + """Create an instance of PricingPlanProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_menus (list) + _items = [] + if self.pricing_menus: + for _item in self.pricing_menus: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_menus'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingPlanProps: + """Create an instance of PricingPlanProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingPlanProps.parse_obj(obj) + + _obj = PricingPlanProps.parse_obj({ + "pricing_menus": [PricingMenu.from_dict(_item) for _item in obj.get("pricing_menus")] if obj.get("pricing_menus") is not None else None, + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_plans.py b/saasus_sdk_python/src/pricing/models/pricing_plans.py new file mode 100644 index 0000000..80e7cdc --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_plans.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from typing_extensions import Annotated + +class PricingPlans(BaseModel): + """ + PricingPlans + """ + pricing_plans: Annotated[List[PricingPlan], Field()] = Field(...) + __properties = ["pricing_plans"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingPlans: + """Create an instance of PricingPlans from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_plans (list) + _items = [] + if self.pricing_plans: + for _item in self.pricing_plans: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_plans'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingPlans: + """Create an instance of PricingPlans from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingPlans.parse_obj(obj) + + _obj = PricingPlans.parse_obj({ + "pricing_plans": [PricingPlan.from_dict(_item) for _item in obj.get("pricing_plans")] if obj.get("pricing_plans") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_tier.py b/saasus_sdk_python/src/pricing/models/pricing_tier.py new file mode 100644 index 0000000..45ce38f --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_tier.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictInt + +class PricingTier(BaseModel): + """ + PricingTier + """ + up_to: StrictInt = Field(..., description="Upper limit") + unit_amount: StrictInt = Field(..., description="Amount per unit") + flat_amount: StrictInt = Field(..., description="Fixed amount") + inf: StrictBool = Field(..., description="Indefinite") + __properties = ["up_to", "unit_amount", "flat_amount", "inf"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTier: + """Create an instance of PricingTier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTier: + """Create an instance of PricingTier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTier.parse_obj(obj) + + _obj = PricingTier.parse_obj({ + "up_to": obj.get("up_to"), + "unit_amount": obj.get("unit_amount"), + "flat_amount": obj.get("flat_amount"), + "inf": obj.get("inf") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_tiered_unit.py b/saasus_sdk_python/src/pricing/models/pricing_tiered_unit.py new file mode 100644 index 0000000..47e8d5f --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_tiered_unit.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUnit(BaseModel): + """ + PricingTieredUnit + """ + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + metering_unit_id: StrictStr = Field(..., description="Universally Unique Identifier") + recurring_interval: RecurringInterval = Field(...) + used: StrictBool = Field(..., description="Indicates if the unit is used") + __properties = ["upper_count", "metering_unit_name", "aggregate_usage", "name", "display_name", "description", "type", "currency", "tiers", "id", "metering_unit_id", "recurring_interval", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUnit: + """Create an instance of PricingTieredUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUnit: + """Create an instance of PricingTieredUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUnit.parse_obj(obj) + + _obj = PricingTieredUnit.parse_obj({ + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "id": obj.get("id"), + "metering_unit_id": obj.get("metering_unit_id"), + "recurring_interval": obj.get("recurring_interval"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_tiered_unit_for_save.py b/saasus_sdk_python/src/pricing/models/pricing_tiered_unit_for_save.py new file mode 100644 index 0000000..40b4e63 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_tiered_unit_for_save.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUnitForSave(BaseModel): + """ + PricingTieredUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + __properties = ["name", "display_name", "description", "type", "currency", "tiers", "upper_count", "metering_unit_name", "aggregate_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUnitForSave: + """Create an instance of PricingTieredUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUnitForSave: + """Create an instance of PricingTieredUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUnitForSave.parse_obj(obj) + + _obj = PricingTieredUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_tiered_usage_unit.py b/saasus_sdk_python/src/pricing/models/pricing_tiered_usage_unit.py new file mode 100644 index 0000000..2b354af --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_tiered_usage_unit.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUsageUnit(BaseModel): + """ + PricingTieredUsageUnit + """ + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + metering_unit_id: StrictStr = Field(..., description="Universally Unique Identifier") + recurring_interval: RecurringInterval = Field(...) + used: StrictBool = Field(..., description="Indicates if the unit is used") + __properties = ["upper_count", "metering_unit_name", "aggregate_usage", "name", "display_name", "description", "type", "currency", "tiers", "id", "metering_unit_id", "recurring_interval", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUsageUnit: + """Create an instance of PricingTieredUsageUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUsageUnit: + """Create an instance of PricingTieredUsageUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUsageUnit.parse_obj(obj) + + _obj = PricingTieredUsageUnit.parse_obj({ + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "id": obj.get("id"), + "metering_unit_id": obj.get("metering_unit_id"), + "recurring_interval": obj.get("recurring_interval"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_tiered_usage_unit_for_save.py b/saasus_sdk_python/src/pricing/models/pricing_tiered_usage_unit_for_save.py new file mode 100644 index 0000000..9c4efa6 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_tiered_usage_unit_for_save.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUsageUnitForSave(BaseModel): + """ + PricingTieredUsageUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + __properties = ["name", "display_name", "description", "type", "currency", "tiers", "upper_count", "metering_unit_name", "aggregate_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUsageUnitForSave: + """Create an instance of PricingTieredUsageUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUsageUnitForSave: + """Create an instance of PricingTieredUsageUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUsageUnitForSave.parse_obj(obj) + + _obj = PricingTieredUsageUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_tiers.py b/saasus_sdk_python/src/pricing/models/pricing_tiers.py new file mode 100644 index 0000000..03f9c67 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_tiers.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from typing_extensions import Annotated + +class PricingTiers(BaseModel): + """ + PricingTiers + """ + tiers: Annotated[List[PricingTier], Field()] = Field(...) + __properties = ["tiers"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTiers: + """Create an instance of PricingTiers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTiers: + """Create an instance of PricingTiers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTiers.parse_obj(obj) + + _obj = PricingTiers.parse_obj({ + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_unit.py b/saasus_sdk_python/src/pricing/models/pricing_unit.py new file mode 100644 index 0000000..acc8157 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_unit.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Literal, Any, List, Optional +from pydantic import field_validator, ConfigDict, BaseModel, StrictStr, ValidationError +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr + +PRICINGUNIT_ONE_OF_SCHEMAS = ["PricingFixedUnit", "PricingTieredUnit", "PricingTieredUsageUnit", "PricingUsageUnit"] + +class PricingUnit(BaseModel): + """ + PricingUnit + """ + # data type: PricingTieredUsageUnit + oneof_schema_1_validator: Optional[PricingTieredUsageUnit] = None + # data type: PricingTieredUnit + oneof_schema_2_validator: Optional[PricingTieredUnit] = None + # data type: PricingUsageUnit + oneof_schema_3_validator: Optional[PricingUsageUnit] = None + # data type: PricingFixedUnit + oneof_schema_4_validator: Optional[PricingFixedUnit] = None + if TYPE_CHECKING: + actual_instance: Union[PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit] + else: + actual_instance: Any = None + one_of_schemas: Literal[PRICINGUNIT_ONE_OF_SCHEMAS] = PRICINGUNIT_ONE_OF_SCHEMAS + model_config = ConfigDict(validate_assignment=True) + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + @classmethod + def actual_instance_must_validate_oneof(cls, v): + instance = PricingUnit.construct() + error_messages = [] + match = 0 + # validate data type: PricingTieredUsageUnit + if not isinstance(v, PricingTieredUsageUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUsageUnit`") + else: + match += 1 + # validate data type: PricingTieredUnit + if not isinstance(v, PricingTieredUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUnit`") + else: + match += 1 + # validate data type: PricingUsageUnit + if not isinstance(v, PricingUsageUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingUsageUnit`") + else: + match += 1 + # validate data type: PricingFixedUnit + if not isinstance(v, PricingFixedUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingFixedUnit`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnit: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnit: + """Returns the object represented by the json string""" + instance = PricingUnit.construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `PricingFixedUnit` + if _data_type == "PricingFixedUnit": + instance.actual_instance = PricingFixedUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnit` + if _data_type == "PricingTieredUnit": + instance.actual_instance = PricingTieredUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnit` + if _data_type == "PricingTieredUsageUnit": + instance.actual_instance = PricingTieredUsageUnit.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnit` + if _data_type == "PricingUsageUnit": + instance.actual_instance = PricingUsageUnit.from_json(json_str) + return instance + + # check if data type is `PricingFixedUnit` + if _data_type == "fixed": + instance.actual_instance = PricingFixedUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnit` + if _data_type == "tiered": + instance.actual_instance = PricingTieredUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnit` + if _data_type == "tiered_usage": + instance.actual_instance = PricingTieredUsageUnit.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnit` + if _data_type == "usage": + instance.actual_instance = PricingUsageUnit.from_json(json_str) + return instance + + # deserialize data into PricingTieredUsageUnit + try: + instance.actual_instance = PricingTieredUsageUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingTieredUnit + try: + instance.actual_instance = PricingTieredUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingUsageUnit + try: + instance.actual_instance = PricingUsageUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingFixedUnit + try: + instance.actual_instance = PricingFixedUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_unit_base_props.py b/saasus_sdk_python/src/pricing/models/pricing_unit_base_props.py new file mode 100644 index 0000000..80ceb7f --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_unit_base_props.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingUnitBaseProps(BaseModel): + """ + PricingUnitBaseProps + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + __properties = ["name", "display_name", "description", "type", "currency"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnitBaseProps: + """Create an instance of PricingUnitBaseProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnitBaseProps: + """Create an instance of PricingUnitBaseProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUnitBaseProps.parse_obj(obj) + + _obj = PricingUnitBaseProps.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_unit_for_save.py b/saasus_sdk_python/src/pricing/models/pricing_unit_for_save.py new file mode 100644 index 0000000..fe16093 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_unit_for_save.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Literal, Any, List, Optional +from pydantic import field_validator, ConfigDict, BaseModel, StrictStr, ValidationError +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr + +PRICINGUNITFORSAVE_ONE_OF_SCHEMAS = ["PricingFixedUnitForSave", "PricingTieredUnitForSave", "PricingTieredUsageUnitForSave", "PricingUsageUnitForSave"] + +class PricingUnitForSave(BaseModel): + """ + PricingUnitForSave + """ + # data type: PricingTieredUsageUnitForSave + oneof_schema_1_validator: Optional[PricingTieredUsageUnitForSave] = None + # data type: PricingTieredUnitForSave + oneof_schema_2_validator: Optional[PricingTieredUnitForSave] = None + # data type: PricingUsageUnitForSave + oneof_schema_3_validator: Optional[PricingUsageUnitForSave] = None + # data type: PricingFixedUnitForSave + oneof_schema_4_validator: Optional[PricingFixedUnitForSave] = None + if TYPE_CHECKING: + actual_instance: Union[PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave] + else: + actual_instance: Any = None + one_of_schemas: Literal[PRICINGUNITFORSAVE_ONE_OF_SCHEMAS] = PRICINGUNITFORSAVE_ONE_OF_SCHEMAS + model_config = ConfigDict(validate_assignment=True) + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + @classmethod + def actual_instance_must_validate_oneof(cls, v): + instance = PricingUnitForSave.construct() + error_messages = [] + match = 0 + # validate data type: PricingTieredUsageUnitForSave + if not isinstance(v, PricingTieredUsageUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUsageUnitForSave`") + else: + match += 1 + # validate data type: PricingTieredUnitForSave + if not isinstance(v, PricingTieredUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUnitForSave`") + else: + match += 1 + # validate data type: PricingUsageUnitForSave + if not isinstance(v, PricingUsageUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingUsageUnitForSave`") + else: + match += 1 + # validate data type: PricingFixedUnitForSave + if not isinstance(v, PricingFixedUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingFixedUnitForSave`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnitForSave: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnitForSave: + """Returns the object represented by the json string""" + instance = PricingUnitForSave.construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `PricingFixedUnitForSave` + if _data_type == "PricingFixedUnitForSave": + instance.actual_instance = PricingFixedUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnitForSave` + if _data_type == "PricingTieredUnitForSave": + instance.actual_instance = PricingTieredUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnitForSave` + if _data_type == "PricingTieredUsageUnitForSave": + instance.actual_instance = PricingTieredUsageUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnitForSave` + if _data_type == "PricingUsageUnitForSave": + instance.actual_instance = PricingUsageUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingFixedUnitForSave` + if _data_type == "fixed": + instance.actual_instance = PricingFixedUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnitForSave` + if _data_type == "tiered": + instance.actual_instance = PricingTieredUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnitForSave` + if _data_type == "tiered_usage": + instance.actual_instance = PricingTieredUsageUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnitForSave` + if _data_type == "usage": + instance.actual_instance = PricingUsageUnitForSave.from_json(json_str) + return instance + + # deserialize data into PricingTieredUsageUnitForSave + try: + instance.actual_instance = PricingTieredUsageUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingTieredUnitForSave + try: + instance.actual_instance = PricingTieredUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingUsageUnitForSave + try: + instance.actual_instance = PricingUsageUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingFixedUnitForSave + try: + instance.actual_instance = PricingFixedUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_units.py b/saasus_sdk_python/src/pricing/models/pricing_units.py new file mode 100644 index 0000000..4b05059 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_units.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from typing_extensions import Annotated + +class PricingUnits(BaseModel): + """ + PricingUnits + """ + units: Annotated[List[PricingUnit], Field()] = Field(...) + __properties = ["units"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnits: + """Create an instance of PricingUnits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnits: + """Create an instance of PricingUnits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUnits.parse_obj(obj) + + _obj = PricingUnits.parse_obj({ + "units": [PricingUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_usage_unit.py b/saasus_sdk_python/src/pricing/models/pricing_usage_unit.py new file mode 100644 index 0000000..d03cc7b --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_usage_unit.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingUsageUnit(BaseModel): + """ + PricingUsageUnit + """ + upper_count: StrictInt = Field(..., description="Upper limit") + unit_amount: StrictInt = Field(..., description="Amount per usage") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + metering_unit_id: StrictStr = Field(..., description="Universally Unique Identifier") + recurring_interval: RecurringInterval = Field(...) + used: StrictBool = Field(...) + __properties = ["upper_count", "unit_amount", "metering_unit_name", "aggregate_usage", "name", "display_name", "description", "type", "currency", "id", "metering_unit_id", "recurring_interval", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUsageUnit: + """Create an instance of PricingUsageUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUsageUnit: + """Create an instance of PricingUsageUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUsageUnit.parse_obj(obj) + + _obj = PricingUsageUnit.parse_obj({ + "upper_count": obj.get("upper_count"), + "unit_amount": obj.get("unit_amount"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "id": obj.get("id"), + "metering_unit_id": obj.get("metering_unit_id"), + "recurring_interval": obj.get("recurring_interval"), + "used": obj.get("used") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/pricing_usage_unit_for_save.py b/saasus_sdk_python/src/pricing/models/pricing_usage_unit_for_save.py new file mode 100644 index 0000000..c704884 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/pricing_usage_unit_for_save.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingUsageUnitForSave(BaseModel): + """ + PricingUsageUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + upper_count: StrictInt = Field(..., description="Upper limit") + unit_amount: StrictInt = Field(..., description="Amount per usage") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + __properties = ["name", "display_name", "description", "type", "currency", "upper_count", "unit_amount", "metering_unit_name", "aggregate_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUsageUnitForSave: + """Create an instance of PricingUsageUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUsageUnitForSave: + """Create an instance of PricingUsageUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUsageUnitForSave.parse_obj(obj) + + _obj = PricingUsageUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "upper_count": obj.get("upper_count"), + "unit_amount": obj.get("unit_amount"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/recurring_interval.py b/saasus_sdk_python/src/pricing/models/recurring_interval.py new file mode 100644 index 0000000..47cadc0 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/recurring_interval.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class RecurringInterval(str, Enum): + """ + Cycle month: Monthly year: Yearly + """ + + """ + allowed enum values + """ + MONTH = 'month' + YEAR = 'year' + + @classmethod + def from_json(cls, json_str: str) -> RecurringInterval: + """Create an instance of RecurringInterval from a JSON string""" + return RecurringInterval(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/pricing/models/save_pricing_menu_param.py b/saasus_sdk_python/src/pricing/models/save_pricing_menu_param.py new file mode 100644 index 0000000..0583d5a --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/save_pricing_menu_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class SavePricingMenuParam(BaseModel): + """ + SavePricingMenuParam + """ + name: StrictStr = Field(..., description="Menu name") + display_name: StrictStr = Field(..., description="Menu display name") + description: StrictStr = Field(..., description="Menu description") + unit_ids: Annotated[List[StrictStr], Field()] = Field(..., description="Unit IDs to add") + __properties = ["name", "display_name", "description", "unit_ids"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SavePricingMenuParam: + """Create an instance of SavePricingMenuParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SavePricingMenuParam: + """Create an instance of SavePricingMenuParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SavePricingMenuParam.parse_obj(obj) + + _obj = SavePricingMenuParam.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "unit_ids": obj.get("unit_ids") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/save_pricing_plan_param.py b/saasus_sdk_python/src/pricing/models/save_pricing_plan_param.py new file mode 100644 index 0000000..eb65bb8 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/save_pricing_plan_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class SavePricingPlanParam(BaseModel): + """ + SavePricingPlanParam + """ + name: StrictStr = Field(..., description="Pricing plan name") + display_name: StrictStr = Field(..., description="Pricing plan display name") + description: StrictStr = Field(..., description="Pricing plan description") + menu_ids: Annotated[List[StrictStr], Field()] = Field(..., description="Menu ID to be added to the pricing plan") + __properties = ["name", "display_name", "description", "menu_ids"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SavePricingPlanParam: + """Create an instance of SavePricingPlanParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SavePricingPlanParam: + """Create an instance of SavePricingPlanParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SavePricingPlanParam.parse_obj(obj) + + _obj = SavePricingPlanParam.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "menu_ids": obj.get("menu_ids") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/tax_rate.py b/saasus_sdk_python/src/pricing/models/tax_rate.py new file mode 100644 index 0000000..b96913b --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/tax_rate.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Union +from pydantic import field_validator, StringConstraints, ConfigDict, BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing_extensions import Annotated + +class TaxRate(BaseModel): + """ + TaxRate + """ + name: StrictStr = Field(..., description="Name of tax rate") + display_name: StrictStr = Field(..., description="Display name") + percentage: Union[StrictFloat, StrictInt] = Field(..., description="Percentage") + inclusive: StrictBool = Field(..., description="Inclusive or not") + country: Annotated[str, StringConstraints(strict=True)] = Field(..., description="Country code of ISO 3166-1 alpha-2") + description: StrictStr = Field(..., description="Description") + id: StrictStr = Field(..., description="Universally Unique Identifier") + __properties = ["name", "display_name", "percentage", "inclusive", "country", "description", "id"] + + @field_validator('country') + @classmethod + def country_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z]{2}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TaxRate: + """Create an instance of TaxRate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaxRate: + """Create an instance of TaxRate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TaxRate.parse_obj(obj) + + _obj = TaxRate.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "percentage": obj.get("percentage"), + "inclusive": obj.get("inclusive"), + "country": obj.get("country"), + "description": obj.get("description"), + "id": obj.get("id") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/tax_rate_props.py b/saasus_sdk_python/src/pricing/models/tax_rate_props.py new file mode 100644 index 0000000..8d2cbb8 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/tax_rate_props.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Union +from pydantic import field_validator, StringConstraints, ConfigDict, BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing_extensions import Annotated + +class TaxRateProps(BaseModel): + """ + TaxRateProps + """ + name: StrictStr = Field(..., description="Name of tax rate") + display_name: StrictStr = Field(..., description="Display name") + percentage: Union[StrictFloat, StrictInt] = Field(..., description="Percentage") + inclusive: StrictBool = Field(..., description="Inclusive or not") + country: Annotated[str, StringConstraints(strict=True)] = Field(..., description="Country code of ISO 3166-1 alpha-2") + description: StrictStr = Field(..., description="Description") + __properties = ["name", "display_name", "percentage", "inclusive", "country", "description"] + + @field_validator('country') + @classmethod + def country_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z]{2}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TaxRateProps: + """Create an instance of TaxRateProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaxRateProps: + """Create an instance of TaxRateProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TaxRateProps.parse_obj(obj) + + _obj = TaxRateProps.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "percentage": obj.get("percentage"), + "inclusive": obj.get("inclusive"), + "country": obj.get("country"), + "description": obj.get("description") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/tax_rates.py b/saasus_sdk_python/src/pricing/models/tax_rates.py new file mode 100644 index 0000000..5759e0d --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/tax_rates.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from typing_extensions import Annotated + +class TaxRates(BaseModel): + """ + TaxRates + """ + tax_rates: Annotated[List[TaxRate], Field()] = Field(...) + __properties = ["tax_rates"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TaxRates: + """Create an instance of TaxRates from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tax_rates (list) + _items = [] + if self.tax_rates: + for _item in self.tax_rates: + if _item: + _items.append(_item.to_dict()) + _dict['tax_rates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaxRates: + """Create an instance of TaxRates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TaxRates.parse_obj(obj) + + _obj = TaxRates.parse_obj({ + "tax_rates": [TaxRate.from_dict(_item) for _item in obj.get("tax_rates")] if obj.get("tax_rates") is not None else None + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/unit_type.py b/saasus_sdk_python/src/pricing/models/unit_type.py new file mode 100644 index 0000000..98d3536 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/unit_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class UnitType(str, Enum): + """ + Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + """ + + """ + allowed enum values + """ + FIXED = 'fixed' + USAGE = 'usage' + TIERED = 'tiered' + TIERED_USAGE = 'tiered_usage' + + @classmethod + def from_json(cls, json_str: str) -> UnitType: + """Create an instance of UnitType from a JSON string""" + return UnitType(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_method.py b/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_method.py new file mode 100644 index 0000000..ad8de80 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_method.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class UpdateMeteringUnitTimestampCountMethod(str, Enum): + """ + Update method add: Addition sub: Subtraction direct: Overwrite + """ + + """ + allowed enum values + """ + ADD = 'add' + SUB = 'sub' + DIRECT = 'direct' + + @classmethod + def from_json(cls, json_str: str) -> UpdateMeteringUnitTimestampCountMethod: + """Create an instance of UpdateMeteringUnitTimestampCountMethod from a JSON string""" + return UpdateMeteringUnitTimestampCountMethod(json.loads(json_str)) + + diff --git a/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_now_param.py b/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_now_param.py new file mode 100644 index 0000000..e589406 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_now_param.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod + +class UpdateMeteringUnitTimestampCountNowParam(BaseModel): + """ + UpdateMeteringUnitTimestampCountNowParam + """ + method: UpdateMeteringUnitTimestampCountMethod = Field(...) + count: StrictInt = Field(..., description="Count") + __properties = ["method", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateMeteringUnitTimestampCountNowParam: + """Create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateMeteringUnitTimestampCountNowParam: + """Create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateMeteringUnitTimestampCountNowParam.parse_obj(obj) + + _obj = UpdateMeteringUnitTimestampCountNowParam.parse_obj({ + "method": obj.get("method"), + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_param.py b/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_param.py new file mode 100644 index 0000000..97cc4ea --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/update_metering_unit_timestamp_count_param.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod + +class UpdateMeteringUnitTimestampCountParam(BaseModel): + """ + UpdateMeteringUnitTimestampCountParam + """ + method: UpdateMeteringUnitTimestampCountMethod = Field(...) + count: StrictInt = Field(..., description="Count") + __properties = ["method", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateMeteringUnitTimestampCountParam: + """Create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateMeteringUnitTimestampCountParam: + """Create an instance of UpdateMeteringUnitTimestampCountParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateMeteringUnitTimestampCountParam.parse_obj(obj) + + _obj = UpdateMeteringUnitTimestampCountParam.parse_obj({ + "method": obj.get("method"), + "count": obj.get("count") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/update_pricing_plans_used_param.py b/saasus_sdk_python/src/pricing/models/update_pricing_plans_used_param.py new file mode 100644 index 0000000..3700bb4 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/update_pricing_plans_used_param.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class UpdatePricingPlansUsedParam(BaseModel): + """ + UpdatePricingPlansUsedParam + """ + plan_ids: Annotated[List[StrictStr], Field()] = Field(...) + __properties = ["plan_ids"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdatePricingPlansUsedParam: + """Create an instance of UpdatePricingPlansUsedParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdatePricingPlansUsedParam: + """Create an instance of UpdatePricingPlansUsedParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdatePricingPlansUsedParam.parse_obj(obj) + + _obj = UpdatePricingPlansUsedParam.parse_obj({ + "plan_ids": obj.get("plan_ids") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/models/update_tax_rate_param.py b/saasus_sdk_python/src/pricing/models/update_tax_rate_param.py new file mode 100644 index 0000000..8170440 --- /dev/null +++ b/saasus_sdk_python/src/pricing/models/update_tax_rate_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateTaxRateParam(BaseModel): + """ + UpdateTaxRateParam + """ + display_name: StrictStr = Field(..., description="Display name") + description: StrictStr = Field(..., description="Description") + __properties = ["display_name", "description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateTaxRateParam: + """Create an instance of UpdateTaxRateParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateTaxRateParam: + """Create an instance of UpdateTaxRateParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateTaxRateParam.parse_obj(obj) + + _obj = UpdateTaxRateParam.parse_obj({ + "display_name": obj.get("display_name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/saasus_sdk_python/src/pricing/py.typed b/saasus_sdk_python/src/pricing/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/saasus_sdk_python/src/pricing/rest.py b/saasus_sdk_python/src/pricing/rest.py new file mode 100644 index 0000000..bfe950f --- /dev/null +++ b/saasus_sdk_python/src/pricing/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.pricing.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/templates/openapi-generator/README.md b/templates/openapi-generator/README.md new file mode 100644 index 0000000..00d7263 --- /dev/null +++ b/templates/openapi-generator/README.md @@ -0,0 +1,39 @@ +# Custom OpenAPI Generator Templates + +## Overview +This directory contains custom templates for the OpenAPI Generator. These templates are based on the standard Python templates for version `v7.0.0`, with minor adjustments to support specific project requirements. + +## Customizations +### File: `model_oneof.mustache` +- **Modification**: + - A minor change was made to add type hints for `discriminator_value_class_map` to resolve issues when using `bump-pydantic` with Pydantic v2. + - This ensures the generated code complies with type checking and avoids runtime errors. + +- **Before:** + ```python + discriminator_value_class_map = { + ``` + +- **After:** + ```python + discriminator_value_class_map: Dict[str, str] = { + ``` + +### Purpose +- This change ensures compatibility with Pydantic v2, which expects explicit type annotations for better type checking and runtime behavior. + +## Impact +- This customization affects only files generated with the `model_oneof.mustache` template. +- Other templates remain unchanged and follow the default behavior of OpenAPI Generator v7.0.0. + +## Usage +When generating SDK code, specify the custom templates using the `--template-dir` option in your `generate.sh` script. For example: +```bash +docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v7.0.0 generate \ + -i ${target} \ + -g python \ + --template-dir /local/templates/openapi-generator/python-v7.0.0/ \ + -o /local/saasus_sdk_python/generated/ \ + --additional-properties useOneOfDiscriminatorLookup=true \ + --package-name saasus_sdk_python.src.${module} +``` diff --git a/templates/openapi-generator/python-v7-0-0/model_oneof.mustache b/templates/openapi-generator/python-v7-0-0/model_oneof.mustache new file mode 100644 index 0000000..d349c92 --- /dev/null +++ b/templates/openapi-generator/python-v7-0-0/model_oneof.mustache @@ -0,0 +1,206 @@ +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +{{#vendorExtensions.x-py-datetime-imports}}{{#-first}}from datetime import{{/-first}} {{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-py-datetime-imports}} +{{#vendorExtensions.x-py-typing-imports}}{{#-first}}from typing import{{/-first}} {{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-py-typing-imports}} +{{#vendorExtensions.x-py-pydantic-imports}}{{#-first}}from pydantic import{{/-first}} {{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-py-pydantic-imports}} +{{#vendorExtensions.x-py-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-model-imports}} +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr, Field + +{{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ONE_OF_SCHEMAS = [{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}] + +class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}): + """ + {{{description}}}{{^description}}{{{classname}}}{{/description}} + """ +{{#composedSchemas.oneOf}} + # data type: {{{dataType}}} + {{vendorExtensions.x-py-name}}: {{{vendorExtensions.x-py-typing}}} +{{/composedSchemas.oneOf}} + if TYPE_CHECKING: + actual_instance: Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}] + else: + actual_instance: Any + one_of_schemas: List[str] = Field({{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ONE_OF_SCHEMAS, const=True) + + class Config: + validate_assignment = True +{{#discriminator}} + + discriminator_value_class_map: Dict[str, str] = { +{{#children}} + '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} +{{/children}} + } +{{/discriminator}} + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + {{#isNullable}} + if v is None: + return v + + {{/isNullable}} + instance = {{{classname}}}.construct() + error_messages = [] + match = 0 + {{#composedSchemas.oneOf}} + # validate data type: {{{dataType}}} + {{#isContainer}} + try: + instance.{{vendorExtensions.x-py-name}} = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isContainer}} + {{^isContainer}} + {{#isPrimitiveType}} + try: + instance.{{vendorExtensions.x-py-name}} = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{^isPrimitiveType}} + if not isinstance(v, {{{dataType}}}): + error_messages.append(f"Error! Input type `{type(v)}` is not `{{{dataType}}}`") + else: + match += 1 + {{/isPrimitiveType}} + {{/isContainer}} + {{/composedSchemas.oneOf}} + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> {{{classname}}}: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> {{{classname}}}: + """Returns the object represented by the json string""" + instance = {{{classname}}}.construct() + {{#isNullable}} + if json_str is None: + return instance + + {{/isNullable}} + error_messages = [] + match = 0 + + {{#useOneOfDiscriminatorLookup}} + {{#discriminator}} + {{#mappedModels}} + {{#-first}} + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("{{{propertyBaseName}}}") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `{{{propertyBaseName}}}` in the input.") + + {{/-first}} + # check if data type is `{{{modelName}}}` + if _data_type == "{{{mappingName}}}": + instance.actual_instance = {{{modelName}}}.from_json(json_str) + return instance + + {{/mappedModels}} + {{/discriminator}} + {{/useOneOfDiscriminatorLookup}} + {{#composedSchemas.oneOf}} + {{#isContainer}} + # deserialize data into {{{dataType}}} + try: + # validation + instance.{{vendorExtensions.x-py-name}} = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.{{vendorExtensions.x-py-name}} + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isContainer}} + {{^isContainer}} + {{#isPrimitiveType}} + # deserialize data into {{{dataType}}} + try: + # validation + instance.{{vendorExtensions.x-py-name}} = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.{{vendorExtensions.x-py-name}} + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{^isPrimitiveType}} + # deserialize data into {{{dataType}}} + try: + instance.actual_instance = {{{dataType}}}.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + {{/isPrimitiveType}} + {{/isContainer}} + {{/composedSchemas.oneOf}} + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + +{{#vendorExtensions.x-py-postponed-model-imports.size}} +{{#vendorExtensions.x-py-postponed-model-imports}} +{{{.}}} +{{/vendorExtensions.x-py-postponed-model-imports}} +{{classname}}.update_forward_refs() +{{/vendorExtensions.x-py-postponed-model-imports.size}} \ No newline at end of file diff --git a/test/apilog/__init__.py b/test/apilog/__init__.py new file mode 100644 index 0000000..4d79a1e --- /dev/null +++ b/test/apilog/__init__.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.apilog.api.api_log_api import ApiLogApi +from saasus_sdk_python.src.apilog.api.error_api import ErrorApi + +# import ApiClient +from saasus_sdk_python.src.apilog.api_response import ApiResponse +from saasus_sdk_python.src.apilog.api_client import ApiClient +from saasus_sdk_python.src.apilog.configuration import Configuration +from saasus_sdk_python.src.apilog.exceptions import OpenApiException +from saasus_sdk_python.src.apilog.exceptions import ApiTypeError +from saasus_sdk_python.src.apilog.exceptions import ApiValueError +from saasus_sdk_python.src.apilog.exceptions import ApiKeyError +from saasus_sdk_python.src.apilog.exceptions import ApiAttributeError +from saasus_sdk_python.src.apilog.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.models.error import Error diff --git a/test/apilog/api/__init__.py b/test/apilog/api/__init__.py new file mode 100644 index 0000000..956683c --- /dev/null +++ b/test/apilog/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.apilog.api.api_log_api import ApiLogApi +from saasus_sdk_python.src.apilog.api.error_api import ErrorApi + diff --git a/test/apilog/api/api_log_api.py b/test/apilog/api/api_log_api.py new file mode 100644 index 0000000..64a0251 --- /dev/null +++ b/test/apilog/api/api_log_api.py @@ -0,0 +1,359 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from datetime import date, datetime + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs + +from saasus_sdk_python.src.apilog.api_client import ApiClient +from saasus_sdk_python.src.apilog.api_response import ApiResponse +from saasus_sdk_python.src.apilog.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ApiLogApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_log(self, api_log_id : Annotated[StrictStr, Field(..., description="API Log ID")], **kwargs) -> ApiLog: # noqa: E501 + """Get API execution log # noqa: E501 + + Retrieve the log of the API execution with the specified ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_log(api_log_id, async_req=True) + >>> result = thread.get() + + :param api_log_id: API Log ID (required) + :type api_log_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ApiLog + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_log_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_log_with_http_info(api_log_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_log_with_http_info(self, api_log_id : Annotated[StrictStr, Field(..., description="API Log ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get API execution log # noqa: E501 + + Retrieve the log of the API execution with the specified ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_log_with_http_info(api_log_id, async_req=True) + >>> result = thread.get() + + :param api_log_id: API Log ID (required) + :type api_log_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiLog, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'api_log_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_log" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['api_log_id']: + _path_params['api_log_id'] = _params['api_log_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "ApiLog", + '500': "Error", + } + + return self.api_client.call_api( + '/logs/{api_log_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_logs(self, created_date : Annotated[Optional[date], Field(description="The date, in format of YYYY-MM-DD, to retrieve the log.")] = None, created_at : Annotated[Optional[datetime], Field(description="The datetime, in ISO 8601 format, to retrieve the log.")] = None, limit : Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Maximum number of logs to retrieve.")] = None, cursor : Annotated[Optional[StrictStr], Field(description="Cursor for cursor pagination.")] = None, **kwargs) -> ApiLogs: # noqa: E501 + """Get API execution log list # noqa: E501 + + Retrieve the log of all API executions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_logs(created_date, created_at, limit, cursor, async_req=True) + >>> result = thread.get() + + :param created_date: The date, in format of YYYY-MM-DD, to retrieve the log. + :type created_date: date + :param created_at: The datetime, in ISO 8601 format, to retrieve the log. + :type created_at: datetime + :param limit: Maximum number of logs to retrieve. + :type limit: int + :param cursor: Cursor for cursor pagination. + :type cursor: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ApiLogs + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_logs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_logs_with_http_info(created_date, created_at, limit, cursor, **kwargs) # noqa: E501 + + @validate_arguments + def get_logs_with_http_info(self, created_date : Annotated[Optional[date], Field(description="The date, in format of YYYY-MM-DD, to retrieve the log.")] = None, created_at : Annotated[Optional[datetime], Field(description="The datetime, in ISO 8601 format, to retrieve the log.")] = None, limit : Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Maximum number of logs to retrieve.")] = None, cursor : Annotated[Optional[StrictStr], Field(description="Cursor for cursor pagination.")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get API execution log list # noqa: E501 + + Retrieve the log of all API executions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_logs_with_http_info(created_date, created_at, limit, cursor, async_req=True) + >>> result = thread.get() + + :param created_date: The date, in format of YYYY-MM-DD, to retrieve the log. + :type created_date: date + :param created_at: The datetime, in ISO 8601 format, to retrieve the log. + :type created_at: datetime + :param limit: Maximum number of logs to retrieve. + :type limit: int + :param cursor: Cursor for cursor pagination. + :type cursor: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiLogs, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'created_date', + 'created_at', + 'limit', + 'cursor' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_logs" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('created_date') is not None: # noqa: E501 + if isinstance(_params['created_date'], date): + _query_params.append(('created_date', _params['created_date'].strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(('created_date', _params['created_date'])) + + if _params.get('created_at') is not None: # noqa: E501 + if isinstance(_params['created_at'], datetime): + _query_params.append(('created_at', _params['created_at'].strftime(self.api_client.configuration.datetime_format))) + else: + _query_params.append(('created_at', _params['created_at'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('cursor') is not None: # noqa: E501 + _query_params.append(('cursor', _params['cursor'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "ApiLogs", + '500': "Error", + } + + return self.api_client.call_api( + '/logs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/apilog/api/error_api.py b/test/apilog/api/error_api.py new file mode 100644 index 0000000..8a3d504 --- /dev/null +++ b/test/apilog/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.apilog.api_client import ApiClient +from saasus_sdk_python.src.apilog.api_response import ApiResponse +from saasus_sdk_python.src.apilog.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Returns a server error with status code 500 # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Returns a server error with status code 500 # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/apilog/api_client.py b/test/apilog/api_client.py new file mode 100644 index 0000000..2c8fcd2 --- /dev/null +++ b/test/apilog/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.apilog.configuration import Configuration +from saasus_sdk_python.src.apilog.api_response import ApiResponse +import saasus_sdk_python.src.apilog.models +from saasus_sdk_python.src.apilog import rest +from saasus_sdk_python.src.apilog.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.apilog.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/apilog/api_response.py b/test/apilog/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/apilog/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/apilog/configuration.py b/test/apilog/configuration.py new file mode 100644 index 0000000..bb06bab --- /dev/null +++ b/test/apilog/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.apilog.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/apilog" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.apilog") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/apilog", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/apilog/exceptions.py b/test/apilog/exceptions.py new file mode 100644 index 0000000..5ea3592 --- /dev/null +++ b/test/apilog/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/apilog/models/__init__.py b/test/apilog/models/__init__.py new file mode 100644 index 0000000..3379fbb --- /dev/null +++ b/test/apilog/models/__init__.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from saasus_sdk_python.src.apilog.models.api_logs import ApiLogs +from saasus_sdk_python.src.apilog.models.error import Error diff --git a/test/apilog/models/api_log.py b/test/apilog/models/api_log.py new file mode 100644 index 0000000..a72cd00 --- /dev/null +++ b/test/apilog/models/api_log.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class ApiLog(BaseModel): + """ + ApiLog + """ + trace_id: StrictStr = Field(..., description="Trace ID") + api_log_id: StrictStr = Field(...) + created_at: StrictInt = Field(..., description="Epoch second of API log registration timestamp") + created_date: StrictStr = Field(..., description="API log registration date") + ttl: StrictInt = Field(..., description="Epoch second of planned API log deletion") + request_method: StrictStr = Field(..., description="Request method") + saas_id: StrictStr = Field(...) + api_key: StrictStr = Field(..., description="API Key") + response_status: StrictStr = Field(..., description="Response status") + request_uri: StrictStr = Field(..., description="Request URI") + remote_address: StrictStr = Field(..., description="Client IP Address") + referer: StrictStr = Field(..., description="The referrer of the request") + request_body: StrictStr = Field(..., description="The body of the request") + response_body: StrictStr = Field(..., description="The body of the response") + __properties = ["trace_id", "api_log_id", "created_at", "created_date", "ttl", "request_method", "saas_id", "api_key", "response_status", "request_uri", "remote_address", "referer", "request_body", "response_body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ApiLog: + """Create an instance of ApiLog from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiLog: + """Create an instance of ApiLog from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ApiLog.parse_obj(obj) + + _obj = ApiLog.parse_obj({ + "trace_id": obj.get("trace_id"), + "api_log_id": obj.get("api_log_id"), + "created_at": obj.get("created_at"), + "created_date": obj.get("created_date"), + "ttl": obj.get("ttl"), + "request_method": obj.get("request_method"), + "saas_id": obj.get("saas_id"), + "api_key": obj.get("api_key"), + "response_status": obj.get("response_status"), + "request_uri": obj.get("request_uri"), + "remote_address": obj.get("remote_address"), + "referer": obj.get("referer"), + "request_body": obj.get("request_body"), + "response_body": obj.get("response_body") + }) + return _obj + + diff --git a/test/apilog/models/api_logs.py b/test/apilog/models/api_logs.py new file mode 100644 index 0000000..02565e7 --- /dev/null +++ b/test/apilog/models/api_logs.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.apilog.models.api_log import ApiLog +from typing_extensions import Annotated + +class ApiLogs(BaseModel): + """ + ApiLogs + """ + api_logs: Annotated[List[ApiLog], Field()] = Field(...) + cursor: Optional[StrictStr] = Field(None, description="Cursor for cursor pagination") + __properties = ["api_logs", "cursor"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ApiLogs: + """Create an instance of ApiLogs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in api_logs (list) + _items = [] + if self.api_logs: + for _item in self.api_logs: + if _item: + _items.append(_item.to_dict()) + _dict['api_logs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiLogs: + """Create an instance of ApiLogs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ApiLogs.parse_obj(obj) + + _obj = ApiLogs.parse_obj({ + "api_logs": [ApiLog.from_dict(_item) for _item in obj.get("api_logs")] if obj.get("api_logs") is not None else None, + "cursor": obj.get("cursor") + }) + return _obj + + diff --git a/test/apilog/models/error.py b/test/apilog/models/error.py new file mode 100644 index 0000000..aa51270 --- /dev/null +++ b/test/apilog/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/apilog/py.typed b/test/apilog/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/apilog/rest.py b/test/apilog/rest.py new file mode 100644 index 0000000..f9fcf22 --- /dev/null +++ b/test/apilog/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus ApiLog API Schema + + SaaSus ApiLog API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.apilog.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/test/auth/__init__.py b/test/auth/__init__.py new file mode 100644 index 0000000..68e853b --- /dev/null +++ b/test/auth/__init__.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.auth.api.auth_info_api import AuthInfoApi +from saasus_sdk_python.src.auth.api.basic_info_api import BasicInfoApi +from saasus_sdk_python.src.auth.api.credential_api import CredentialApi +from saasus_sdk_python.src.auth.api.env_api import EnvApi +from saasus_sdk_python.src.auth.api.error_api import ErrorApi +from saasus_sdk_python.src.auth.api.invitation_api import InvitationApi +from saasus_sdk_python.src.auth.api.role_api import RoleApi +from saasus_sdk_python.src.auth.api.saas_user_api import SaasUserApi +from saasus_sdk_python.src.auth.api.single_tenant_api import SingleTenantApi +from saasus_sdk_python.src.auth.api.tenant_api import TenantApi +from saasus_sdk_python.src.auth.api.tenant_attribute_api import TenantAttributeApi +from saasus_sdk_python.src.auth.api.tenant_user_api import TenantUserApi +from saasus_sdk_python.src.auth.api.user_attribute_api import UserAttributeApi +from saasus_sdk_python.src.auth.api.user_info_api import UserInfoApi + +# import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.configuration import Configuration +from saasus_sdk_python.src.auth.exceptions import OpenApiException +from saasus_sdk_python.src.auth.exceptions import ApiTypeError +from saasus_sdk_python.src.auth.exceptions import ApiValueError +from saasus_sdk_python.src.auth.exceptions import ApiKeyError +from saasus_sdk_python.src.auth.exceptions import ApiAttributeError +from saasus_sdk_python.src.auth.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.attribute_type import AttributeType +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.models.error import Error +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.models.invitation_status import InvitationStatus +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner +from saasus_sdk_python.src.auth.models.invoice_language import InvoiceLanguage +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from saasus_sdk_python.src.auth.models.provider_name import ProviderName +from saasus_sdk_python.src.auth.models.provider_type import ProviderType +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.models.saas_id import SaasId +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam diff --git a/test/auth/api/__init__.py b/test/auth/api/__init__.py new file mode 100644 index 0000000..d1e3ef5 --- /dev/null +++ b/test/auth/api/__init__.py @@ -0,0 +1,18 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.auth.api.auth_info_api import AuthInfoApi +from saasus_sdk_python.src.auth.api.basic_info_api import BasicInfoApi +from saasus_sdk_python.src.auth.api.credential_api import CredentialApi +from saasus_sdk_python.src.auth.api.env_api import EnvApi +from saasus_sdk_python.src.auth.api.error_api import ErrorApi +from saasus_sdk_python.src.auth.api.invitation_api import InvitationApi +from saasus_sdk_python.src.auth.api.role_api import RoleApi +from saasus_sdk_python.src.auth.api.saas_user_api import SaasUserApi +from saasus_sdk_python.src.auth.api.single_tenant_api import SingleTenantApi +from saasus_sdk_python.src.auth.api.tenant_api import TenantApi +from saasus_sdk_python.src.auth.api.tenant_attribute_api import TenantAttributeApi +from saasus_sdk_python.src.auth.api.tenant_user_api import TenantUserApi +from saasus_sdk_python.src.auth.api.user_attribute_api import UserAttributeApi +from saasus_sdk_python.src.auth.api.user_info_api import UserInfoApi + diff --git a/test/auth/api/auth_info_api.py b/test/auth/api/auth_info_api.py new file mode 100644 index 0000000..b03bed1 --- /dev/null +++ b/test/auth/api/auth_info_api.py @@ -0,0 +1,876 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AuthInfoApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_auth_info(self, **kwargs) -> AuthInfo: # noqa: E501 + """Get Authentication Info # noqa: E501 + + Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AuthInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_auth_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_auth_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_auth_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication Info # noqa: E501 + + Get the post-login SaaS URL that contains authentication information. You can pass authentication information to the URL obtained here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AuthInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_auth_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "AuthInfo", + '500': "Error", + } + + return self.api_client.call_api( + '/auth-info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_identity_providers(self, **kwargs) -> IdentityProviders: # noqa: E501 + """Get Sign-In Information Via External Provider # noqa: E501 + + Get sign-in information via external provider set in cognito. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_identity_providers(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: IdentityProviders + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_identity_providers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_identity_providers_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_identity_providers_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Sign-In Information Via External Provider # noqa: E501 + + Get sign-in information via external provider set in cognito. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_identity_providers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(IdentityProviders, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_identity_providers" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "IdentityProviders", + '500': "Error", + } + + return self.api_client.call_api( + '/identity-providers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_sign_in_settings(self, **kwargs) -> SignInSettings: # noqa: E501 + """Get Password Requirements # noqa: E501 + + Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_sign_in_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SignInSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_sign_in_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_sign_in_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_sign_in_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Password Requirements # noqa: E501 + + Get user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_sign_in_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SignInSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sign_in_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SignInSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/sign-in-settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_auth_info(self, body : Optional[AuthInfo] = None, **kwargs) -> None: # noqa: E501 + """Update Authentication Info # noqa: E501 + + Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_auth_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: AuthInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_auth_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_auth_info_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def update_auth_info_with_http_info(self, body : Optional[AuthInfo] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Authentication Info # noqa: E501 + + Register post-login SaaS URL for authentication information. It is possible to pass authentication information to the URL registered here and implement this Callback using the SaaSus SDK. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_auth_info_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: AuthInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_auth_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/auth-info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_identity_provider(self, update_identity_provider_param : Optional[UpdateIdentityProviderParam] = None, **kwargs) -> None: # noqa: E501 + """Update Sign-In Information # noqa: E501 + + Update the sign-in information for the external ID provider # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_identity_provider(update_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param update_identity_provider_param: + :type update_identity_provider_param: UpdateIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_identity_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_identity_provider_with_http_info(update_identity_provider_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_identity_provider_with_http_info(self, update_identity_provider_param : Optional[UpdateIdentityProviderParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Sign-In Information # noqa: E501 + + Update the sign-in information for the external ID provider # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_identity_provider_with_http_info(update_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param update_identity_provider_param: + :type update_identity_provider_param: UpdateIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_identity_provider_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_identity_provider" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_identity_provider_param'] is not None: + _body_params = _params['update_identity_provider_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/identity-providers', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_sign_in_settings(self, update_sign_in_settings_param : Optional[UpdateSignInSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update Password Requirements # noqa: E501 + + Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_sign_in_settings(update_sign_in_settings_param, async_req=True) + >>> result = thread.get() + + :param update_sign_in_settings_param: + :type update_sign_in_settings_param: UpdateSignInSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_sign_in_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_sign_in_settings_with_http_info(update_sign_in_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_sign_in_settings_with_http_info(self, update_sign_in_settings_param : Optional[UpdateSignInSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Password Requirements # noqa: E501 + + Update user password requirements. Set a secure password that is difficult to decipher by increasing the number of digits by combining alphabets, numbers, and symbols. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_sign_in_settings_with_http_info(update_sign_in_settings_param, async_req=True) + >>> result = thread.get() + + :param update_sign_in_settings_param: + :type update_sign_in_settings_param: UpdateSignInSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_sign_in_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_sign_in_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_sign_in_settings_param'] is not None: + _body_params = _params['update_sign_in_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/sign-in-settings', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/basic_info_api.py b/test/auth/api/basic_info_api.py new file mode 100644 index 0000000..6097584 --- /dev/null +++ b/test/auth/api/basic_info_api.py @@ -0,0 +1,1155 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class BasicInfoApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def find_notification_messages(self, **kwargs) -> NotificationMessages: # noqa: E501 + """Get Notification Email Templates # noqa: E501 + + Get notification email templates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.find_notification_messages(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NotificationMessages + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the find_notification_messages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.find_notification_messages_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def find_notification_messages_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Notification Email Templates # noqa: E501 + + Get notification email templates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.find_notification_messages_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NotificationMessages, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method find_notification_messages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "NotificationMessages", + '500': "Error", + } + + return self.api_client.call_api( + '/notification-messages', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_basic_info(self, **kwargs) -> BasicInfo: # noqa: E501 + """Get Basic Configurations # noqa: E501 + + Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_basic_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: BasicInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_basic_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_basic_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_basic_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Basic Configurations # noqa: E501 + + Get the domain name and CNAME record based on the SaaS ID. By setting the CNAME record on the DNS the login screen will be generated. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_basic_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BasicInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_basic_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "BasicInfo", + '500': "Error", + } + + return self.api_client.call_api( + '/basic-info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customize_page_settings(self, **kwargs) -> CustomizePageSettings: # noqa: E501 + """Get Authentication Authorization Basic Information # noqa: E501 + + Get authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_page_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CustomizePageSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customize_page_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customize_page_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_customize_page_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication Authorization Basic Information # noqa: E501 + + Get authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_page_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CustomizePageSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customize_page_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CustomizePageSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/customize-page-settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customize_pages(self, **kwargs) -> CustomizePages: # noqa: E501 + """Get Authentication Page Setting # noqa: E501 + + Get the authentication screen setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_pages(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CustomizePages + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customize_pages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customize_pages_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_customize_pages_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication Page Setting # noqa: E501 + + Get the authentication screen setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customize_pages_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CustomizePages, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customize_pages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CustomizePages", + '500': "Error", + } + + return self.api_client.call_api( + '/customize-pages', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_basic_info(self, update_basic_info_param : Optional[UpdateBasicInfoParam] = None, **kwargs) -> None: # noqa: E501 + """Update Basic Configurations # noqa: E501 + + Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_basic_info(update_basic_info_param, async_req=True) + >>> result = thread.get() + + :param update_basic_info_param: + :type update_basic_info_param: UpdateBasicInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_basic_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_basic_info_with_http_info(update_basic_info_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_basic_info_with_http_info(self, update_basic_info_param : Optional[UpdateBasicInfoParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Basic Configurations # noqa: E501 + + Update the domain name that was set as a parameter based on the SaaS ID. After the CNAME record is generated, set it in your DNS. If it is set on a SaaS application that is already running, it will affect the behavior. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_basic_info_with_http_info(update_basic_info_param, async_req=True) + >>> result = thread.get() + + :param update_basic_info_param: + :type update_basic_info_param: UpdateBasicInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_basic_info_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_basic_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_basic_info_param'] is not None: + _body_params = _params['update_basic_info_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/basic-info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_customize_page_settings(self, update_customize_page_settings_param : Optional[UpdateCustomizePageSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update Authentication Authorization Basic Information # noqa: E501 + + Update authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_page_settings(update_customize_page_settings_param, async_req=True) + >>> result = thread.get() + + :param update_customize_page_settings_param: + :type update_customize_page_settings_param: UpdateCustomizePageSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_customize_page_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_customize_page_settings_with_http_info(update_customize_page_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_customize_page_settings_with_http_info(self, update_customize_page_settings_param : Optional[UpdateCustomizePageSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Authentication Authorization Basic Information # noqa: E501 + + Update authentication authorization basic information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_page_settings_with_http_info(update_customize_page_settings_param, async_req=True) + >>> result = thread.get() + + :param update_customize_page_settings_param: + :type update_customize_page_settings_param: UpdateCustomizePageSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_customize_page_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_customize_page_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_customize_page_settings_param'] is not None: + _body_params = _params['update_customize_page_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/customize-page-settings', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_customize_pages(self, update_customize_pages_param : Optional[UpdateCustomizePagesParam] = None, **kwargs) -> None: # noqa: E501 + """Authentication Page Setting # noqa: E501 + + Update the authentication page setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_pages(update_customize_pages_param, async_req=True) + >>> result = thread.get() + + :param update_customize_pages_param: + :type update_customize_pages_param: UpdateCustomizePagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_customize_pages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_customize_pages_with_http_info(update_customize_pages_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_customize_pages_with_http_info(self, update_customize_pages_param : Optional[UpdateCustomizePagesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Authentication Page Setting # noqa: E501 + + Update the authentication page setting information (new registration, login, password reset, etc.). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_customize_pages_with_http_info(update_customize_pages_param, async_req=True) + >>> result = thread.get() + + :param update_customize_pages_param: + :type update_customize_pages_param: UpdateCustomizePagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_customize_pages_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_customize_pages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_customize_pages_param'] is not None: + _body_params = _params['update_customize_pages_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/customize-pages', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_notification_messages(self, update_notification_messages_param : Optional[UpdateNotificationMessagesParam] = None, **kwargs) -> None: # noqa: E501 + """Update Notification Email Template # noqa: E501 + + Update notification email template. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_notification_messages(update_notification_messages_param, async_req=True) + >>> result = thread.get() + + :param update_notification_messages_param: + :type update_notification_messages_param: UpdateNotificationMessagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_notification_messages_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_notification_messages_with_http_info(update_notification_messages_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_notification_messages_with_http_info(self, update_notification_messages_param : Optional[UpdateNotificationMessagesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Notification Email Template # noqa: E501 + + Update notification email template. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_notification_messages_with_http_info(update_notification_messages_param, async_req=True) + >>> result = thread.get() + + :param update_notification_messages_param: + :type update_notification_messages_param: UpdateNotificationMessagesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_notification_messages_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_notification_messages" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_notification_messages_param'] is not None: + _body_params = _params['update_notification_messages_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/notification-messages', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/credential_api.py b/test/auth/api/credential_api.py new file mode 100644 index 0000000..8a0f2c5 --- /dev/null +++ b/test/auth/api/credential_api.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.credentials import Credentials + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CredentialApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_auth_credentials(self, body : Optional[Credentials] = None, **kwargs) -> AuthorizationTempCode: # noqa: E501 + """Save Authentication/Authorization Information # noqa: E501 + + Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_auth_credentials(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Credentials + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AuthorizationTempCode + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_auth_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_auth_credentials_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_auth_credentials_with_http_info(self, body : Optional[Credentials] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Save Authentication/Authorization Information # noqa: E501 + + Temporarily save the parameter for the ID token, access token, and refresh token and return a temporary code for obtaining. Temporary codes are valid for 10 seconds from issuance. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_auth_credentials_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Credentials + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AuthorizationTempCode, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_auth_credentials" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "AuthorizationTempCode", + '400': "Error", + '401': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/credentials', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_auth_credentials(self, code : Annotated[Optional[StrictStr], Field(description="Temp Code")] = None, auth_flow : Annotated[Optional[StrictStr], Field(description="Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth ")] = None, refresh_token : Annotated[Optional[StrictStr], Field(description="Refresh Token")] = None, **kwargs) -> Credentials: # noqa: E501 + """Get Authentication/Authorization Information # noqa: E501 + + Get ID token, access token, and refresh token using a temporary code or a refresh token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_credentials(code, auth_flow, refresh_token, async_req=True) + >>> result = thread.get() + + :param code: Temp Code + :type code: str + :param auth_flow: Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth + :type auth_flow: str + :param refresh_token: Refresh Token + :type refresh_token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Credentials + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_auth_credentials_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_auth_credentials_with_http_info(code, auth_flow, refresh_token, **kwargs) # noqa: E501 + + @validate_arguments + def get_auth_credentials_with_http_info(self, code : Annotated[Optional[StrictStr], Field(description="Temp Code")] = None, auth_flow : Annotated[Optional[StrictStr], Field(description="Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth ")] = None, refresh_token : Annotated[Optional[StrictStr], Field(description="Refresh Token")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get Authentication/Authorization Information # noqa: E501 + + Get ID token, access token, and refresh token using a temporary code or a refresh token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_credentials_with_http_info(code, auth_flow, refresh_token, async_req=True) + >>> result = thread.get() + + :param code: Temp Code + :type code: str + :param auth_flow: Authentication Flow tempCodeAuth: Getting authentication information using a temporary code refreshTokenAuth: Getting authentication information using a refresh token If not specified, it will be tempCodeAuth + :type auth_flow: str + :param refresh_token: Refresh Token + :type refresh_token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Credentials, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'code', + 'auth_flow', + 'refresh_token' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_auth_credentials" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('code') is not None: # noqa: E501 + _query_params.append(('code', _params['code'])) + + if _params.get('auth_flow') is not None: # noqa: E501 + _query_params.append(('auth-flow', _params['auth_flow'])) + + if _params.get('refresh_token') is not None: # noqa: E501 + _query_params.append(('refresh-token', _params['refresh_token'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Credentials", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/credentials', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/env_api.py b/test/auth/api/env_api.py new file mode 100644 index 0000000..d030382 --- /dev/null +++ b/test/auth/api/env_api.py @@ -0,0 +1,757 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictInt + +from typing import Optional + +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EnvApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_env(self, body : Optional[Env] = None, **kwargs) -> Env: # noqa: E501 + """Create Env Info # noqa: E501 + + Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_env(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Env + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Env + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_env_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_env_with_http_info(self, body : Optional[Env] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Env Info # noqa: E501 + + Create environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_env_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Env + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Env, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Env", + '500': "Error", + } + + return self.api_client.call_api( + '/envs', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_env(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> None: # noqa: E501 + """Delete Env Info # noqa: E501 + + Delete env info. Env with id 3 cannot be deleted. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_env(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_env_with_http_info(env_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Env Info # noqa: E501 + + Delete env info. Env with id 3 cannot be deleted. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_env_with_http_info(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'env_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/envs/{env_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_env(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> Env: # noqa: E501 + """Get Env Details # noqa: E501 + + Get environment details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_env(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Env + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_env_with_http_info(env_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Env Details # noqa: E501 + + Get environment details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_env_with_http_info(env_id, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Env, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'env_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Env", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/envs/{env_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_envs(self, **kwargs) -> Envs: # noqa: E501 + """Get Env Info # noqa: E501 + + Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_envs(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Envs + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_envs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_envs_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_envs_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Env Info # noqa: E501 + + Get registered environment information. Multiple environments can be defined, such as an environment for testing linkage, an environment for development, and an environment for actual operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_envs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Envs, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_envs" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Envs", + '500': "Error", + } + + return self.api_client.call_api( + '/envs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_env(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], update_env_param : Optional[UpdateEnvParam] = None, **kwargs) -> None: # noqa: E501 + """Update Env Info # noqa: E501 + + Update env info. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_env(env_id, update_env_param, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param update_env_param: + :type update_env_param: UpdateEnvParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_env_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_env_with_http_info(env_id, update_env_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_env_with_http_info(self, env_id : Annotated[StrictInt, Field(..., description="Env ID")], update_env_param : Optional[UpdateEnvParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Env Info # noqa: E501 + + Update env info. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_env_with_http_info(env_id, update_env_param, async_req=True) + >>> result = thread.get() + + :param env_id: Env ID (required) + :type env_id: int + :param update_env_param: + :type update_env_param: UpdateEnvParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'env_id', + 'update_env_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_env" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_env_param'] is not None: + _body_params = _params['update_env_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/envs/{env_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/error_api.py b/test/auth/api/error_api.py new file mode 100644 index 0000000..cfe618b --- /dev/null +++ b/test/auth/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/invitation_api.py b/test/auth/api/invitation_api.py new file mode 100644 index 0000000..ac58e4d --- /dev/null +++ b/test/auth/api/invitation_api.py @@ -0,0 +1,933 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class InvitationApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant_invitation(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_invitation_param : Optional[CreateTenantInvitationParam] = None, **kwargs) -> Invitation: # noqa: E501 + """Create Tenant Invitation # noqa: E501 + + Create an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_invitation(tenant_id, create_tenant_invitation_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_invitation_param: + :type create_tenant_invitation_param: CreateTenantInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Invitation + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_invitation_with_http_info(tenant_id, create_tenant_invitation_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_invitation_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_invitation_param : Optional[CreateTenantInvitationParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant Invitation # noqa: E501 + + Create an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_invitation_with_http_info(tenant_id, create_tenant_invitation_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_invitation_param: + :type create_tenant_invitation_param: CreateTenantInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Invitation, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'create_tenant_invitation_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_tenant_invitation_param'] is not None: + _body_params = _params['create_tenant_invitation_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Invitation", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_invitation(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> None: # noqa: E501 + """Delete Tenant Invitation # noqa: E501 + + Delete an invitation for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_invitation(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_invitation_with_http_info(tenant_id, invitation_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_invitation_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant Invitation # noqa: E501 + + Delete an invitation for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_invitation_with_http_info(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'invitation_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations/{invitation_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_invitation_validity(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> InvitationValidity: # noqa: E501 + """Get Invitation Validity # noqa: E501 + + Get the validity of an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_invitation_validity(invitation_id, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: InvitationValidity + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_invitation_validity_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_invitation_validity_with_http_info(invitation_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_invitation_validity_with_http_info(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Invitation Validity # noqa: E501 + + Get the validity of an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_invitation_validity_with_http_info(invitation_id, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(InvitationValidity, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'invitation_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_invitation_validity" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "InvitationValidity", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/invitations/{invitation_id}/validity', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_invitation(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> Invitation: # noqa: E501 + """Get Tenant Invitation # noqa: E501 + + Get invitation information for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitation(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Invitation + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_invitation_with_http_info(tenant_id, invitation_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_invitation_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Invitation # noqa: E501 + + Get invitation information for the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitation_with_http_info(tenant_id, invitation_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Invitation, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'invitation_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Invitation", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations/{invitation_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_invitations(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> Invitations: # noqa: E501 + """Get Tenant Invitations # noqa: E501 + + Get a list of invitations to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitations(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Invitations + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_invitations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_invitations_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_invitations_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Invitations # noqa: E501 + + Get a list of invitations to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_invitations_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Invitations, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_invitations" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Invitations", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/invitations', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def validate_invitation(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], validate_invitation_param : Optional[ValidateInvitationParam] = None, **kwargs) -> None: # noqa: E501 + """Validate Invitation # noqa: E501 + + Validate an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.validate_invitation(invitation_id, validate_invitation_param, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param validate_invitation_param: + :type validate_invitation_param: ValidateInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the validate_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.validate_invitation_with_http_info(invitation_id, validate_invitation_param, **kwargs) # noqa: E501 + + @validate_arguments + def validate_invitation_with_http_info(self, invitation_id : Annotated[StrictStr, Field(..., description="Invitation ID")], validate_invitation_param : Optional[ValidateInvitationParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Validate Invitation # noqa: E501 + + Validate an invitation to the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.validate_invitation_with_http_info(invitation_id, validate_invitation_param, async_req=True) + >>> result = thread.get() + + :param invitation_id: Invitation ID (required) + :type invitation_id: str + :param validate_invitation_param: + :type validate_invitation_param: ValidateInvitationParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'invitation_id', + 'validate_invitation_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method validate_invitation" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['invitation_id']: + _path_params['invitation_id'] = _params['invitation_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['validate_invitation_param'] is not None: + _body_params = _params['validate_invitation_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/invitations/{invitation_id}/validate', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/role_api.py b/test/auth/api/role_api.py new file mode 100644 index 0000000..500a94e --- /dev/null +++ b/test/auth/api/role_api.py @@ -0,0 +1,463 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.models.roles import Roles + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class RoleApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_role(self, body : Optional[Role] = None, **kwargs) -> Role: # noqa: E501 + """Create Role # noqa: E501 + + Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_role(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Role + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Role + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_role_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_role_with_http_info(self, body : Optional[Role] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Role # noqa: E501 + + Create a role. By granting users the roles created here, it becomes easier to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_role_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Role + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Role, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_role" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Role", + '500': "Error", + } + + return self.api_client.call_api( + '/roles', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_role(self, role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> None: # noqa: E501 + """Delete Role # noqa: E501 + + Delete role. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_role(role_name, async_req=True) + >>> result = thread.get() + + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_role_with_http_info(role_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_role_with_http_info(self, role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Role # noqa: E501 + + Delete role. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_role_with_http_info(role_name, async_req=True) + >>> result = thread.get() + + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'role_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_role" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['role_name']: + _path_params['role_name'] = _params['role_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/roles/{role_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_roles(self, **kwargs) -> Roles: # noqa: E501 + """Get Roles # noqa: E501 + + Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_roles(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Roles + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_roles_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_roles_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Roles # noqa: E501 + + Get registered roles list. Granting users the roles defined here makes it easy to implement role-based authorization on the SaaS side. In addition, even the same user can have different roles for each tenant/environment to which they belong. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_roles_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Roles, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_roles" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Roles", + '500': "Error", + } + + return self.api_client.call_api( + '/roles', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/saas_user_api.py b/test/auth/api/saas_user_api.py new file mode 100644 index 0000000..9b192b6 --- /dev/null +++ b/test/auth/api/saas_user_api.py @@ -0,0 +1,3144 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SaasUserApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def confirm_email_update(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], confirm_email_update_param : Optional[ConfirmEmailUpdateParam] = None, **kwargs) -> None: # noqa: E501 + """Confirm User Email Update # noqa: E501 + + Verify the code to confirm the user's email address update. Requires the user's access token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_email_update(user_id, confirm_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param confirm_email_update_param: + :type confirm_email_update_param: ConfirmEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the confirm_email_update_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.confirm_email_update_with_http_info(user_id, confirm_email_update_param, **kwargs) # noqa: E501 + + @validate_arguments + def confirm_email_update_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], confirm_email_update_param : Optional[ConfirmEmailUpdateParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Confirm User Email Update # noqa: E501 + + Verify the code to confirm the user's email address update. Requires the user's access token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_email_update_with_http_info(user_id, confirm_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param confirm_email_update_param: + :type confirm_email_update_param: ConfirmEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'confirm_email_update_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_email_update" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['confirm_email_update_param'] is not None: + _body_params = _params['confirm_email_update_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/email/confirm', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def confirm_external_user_link(self, confirm_external_user_link_param : Optional[ConfirmExternalUserLinkParam] = None, **kwargs) -> None: # noqa: E501 + """Confirm External User Account Link # noqa: E501 + + Verify the code for external account user link confirmation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_external_user_link(confirm_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param confirm_external_user_link_param: + :type confirm_external_user_link_param: ConfirmExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the confirm_external_user_link_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.confirm_external_user_link_with_http_info(confirm_external_user_link_param, **kwargs) # noqa: E501 + + @validate_arguments + def confirm_external_user_link_with_http_info(self, confirm_external_user_link_param : Optional[ConfirmExternalUserLinkParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Confirm External User Account Link # noqa: E501 + + Verify the code for external account user link confirmation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_external_user_link_with_http_info(confirm_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param confirm_external_user_link_param: + :type confirm_external_user_link_param: ConfirmExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'confirm_external_user_link_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_external_user_link" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['confirm_external_user_link_param'] is not None: + _body_params = _params['confirm_external_user_link_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/external-users/confirm', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def confirm_sign_up_with_aws_marketplace(self, confirm_sign_up_with_aws_marketplace_param : Optional[ConfirmSignUpWithAwsMarketplaceParam] = None, **kwargs) -> Tenant: # noqa: E501 + """Confirm Sign Up with AWS Marketplace # noqa: E501 + + Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_sign_up_with_aws_marketplace(confirm_sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param confirm_sign_up_with_aws_marketplace_param: + :type confirm_sign_up_with_aws_marketplace_param: ConfirmSignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Tenant + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the confirm_sign_up_with_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.confirm_sign_up_with_aws_marketplace_with_http_info(confirm_sign_up_with_aws_marketplace_param, **kwargs) # noqa: E501 + + @validate_arguments + def confirm_sign_up_with_aws_marketplace_with_http_info(self, confirm_sign_up_with_aws_marketplace_param : Optional[ConfirmSignUpWithAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Confirm Sign Up with AWS Marketplace # noqa: E501 + + Confirm a new use registeration linked to AWS Marketplace. Create a new tenant linked to AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.confirm_sign_up_with_aws_marketplace_with_http_info(confirm_sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param confirm_sign_up_with_aws_marketplace_param: + :type confirm_sign_up_with_aws_marketplace_param: ConfirmSignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Tenant, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'confirm_sign_up_with_aws_marketplace_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method confirm_sign_up_with_aws_marketplace" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['confirm_sign_up_with_aws_marketplace_param'] is not None: + _body_params = _params['confirm_sign_up_with_aws_marketplace_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Tenant", + '500': "Error", + } + + return self.api_client.call_api( + '/aws-marketplace/sign-up-confirm', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> SaasUser: # noqa: E501 + """Create SaaS User # noqa: E501 + + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user(create_saas_user_param, async_req=True) + >>> result = thread.get() + + :param create_saas_user_param: + :type create_saas_user_param: CreateSaasUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_saas_user_with_http_info(create_saas_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_saas_user_with_http_info(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create SaaS User # noqa: E501 + + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user_with_http_info(create_saas_user_param, async_req=True) + >>> result = thread.get() + + :param create_saas_user_param: + :type create_saas_user_param: CreateSaasUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'create_saas_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_saas_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_saas_user_param'] is not None: + _body_params = _params['create_saas_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SaasUser", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_secret_code(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], create_secret_code_param : Optional[CreateSecretCodeParam] = None, **kwargs) -> SoftwareTokenSecretCode: # noqa: E501 + """Create secret code for authentication application registration # noqa: E501 + + Create a secret code for authentication application registration. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_secret_code(user_id, create_secret_code_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param create_secret_code_param: + :type create_secret_code_param: CreateSecretCodeParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SoftwareTokenSecretCode + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_secret_code_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_secret_code_with_http_info(user_id, create_secret_code_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_secret_code_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], create_secret_code_param : Optional[CreateSecretCodeParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create secret code for authentication application registration # noqa: E501 + + Create a secret code for authentication application registration. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_secret_code_with_http_info(user_id, create_secret_code_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param create_secret_code_param: + :type create_secret_code_param: CreateSecretCodeParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SoftwareTokenSecretCode, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'create_secret_code_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_secret_code" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_secret_code_param'] is not None: + _body_params = _params['create_secret_code_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SoftwareTokenSecretCode", + '500': "Error", + } + + return self.api_client.call_api( + '/users/{user_id}/mfa/software-token/secret-code', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_saas_user(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> None: # noqa: E501 + """Delete User # noqa: E501 + + Delete all users with matching user ID from the tenant and SaaS. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_saas_user(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_saas_user_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_saas_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete User # noqa: E501 + + Delete all users with matching user ID from the tenant and SaaS. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_saas_user_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_saas_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_saas_user(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> SaasUser: # noqa: E501 + """Get User # noqa: E501 + + Get user information based on user ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_user(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_saas_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_saas_user_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_saas_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User # noqa: E501 + + Get user information based on user ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_user_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_saas_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SaasUser", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/users/{user_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_saas_users(self, **kwargs) -> SaasUsers: # noqa: E501 + """Get Users # noqa: E501 + + Get all SaaS users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_users(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUsers + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_saas_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_saas_users_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_saas_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Users # noqa: E501 + + Get all SaaS users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_saas_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUsers, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_saas_users" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SaasUsers", + '500': "Error", + } + + return self.api_client.call_api( + '/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_user_mfa_preference(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> MfaPreference: # noqa: E501 + """Get User's MFA Settings # noqa: E501 + + Get the user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_mfa_preference(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MfaPreference + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_mfa_preference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_mfa_preference_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_user_mfa_preference_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User's MFA Settings # noqa: E501 + + Get the user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_mfa_preference_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MfaPreference, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_mfa_preference" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MfaPreference", + '500': "Error", + } + + return self.api_client.call_api( + '/users/{user_id}/mfa/preference', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def link_aws_marketplace(self, link_aws_marketplace_param : Optional[LinkAwsMarketplaceParam] = None, **kwargs) -> None: # noqa: E501 + """Link an existing tenant with AWS Marketplace # noqa: E501 + + Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_aws_marketplace(link_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param link_aws_marketplace_param: + :type link_aws_marketplace_param: LinkAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the link_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.link_aws_marketplace_with_http_info(link_aws_marketplace_param, **kwargs) # noqa: E501 + + @validate_arguments + def link_aws_marketplace_with_http_info(self, link_aws_marketplace_param : Optional[LinkAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Link an existing tenant with AWS Marketplace # noqa: E501 + + Link an existing tenant with AWS Marketplace. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_aws_marketplace_with_http_info(link_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param link_aws_marketplace_param: + :type link_aws_marketplace_param: LinkAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'link_aws_marketplace_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method link_aws_marketplace" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['link_aws_marketplace_param'] is not None: + _body_params = _params['link_aws_marketplace_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/aws-marketplace/link', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def request_email_update(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], request_email_update_param : Optional[RequestEmailUpdateParam] = None, **kwargs) -> None: # noqa: E501 + """Request User Email Update # noqa: E501 + + Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_email_update(user_id, request_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param request_email_update_param: + :type request_email_update_param: RequestEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the request_email_update_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.request_email_update_with_http_info(user_id, request_email_update_param, **kwargs) # noqa: E501 + + @validate_arguments + def request_email_update_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], request_email_update_param : Optional[RequestEmailUpdateParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Request User Email Update # noqa: E501 + + Request to update the user's email address. Sends a verification code to the requested email address. Requires the user's access token. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_email_update_with_http_info(user_id, request_email_update_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param request_email_update_param: + :type request_email_update_param: RequestEmailUpdateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'request_email_update_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method request_email_update" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['request_email_update_param'] is not None: + _body_params = _params['request_email_update_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/email/request', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def request_external_user_link(self, request_external_user_link_param : Optional[RequestExternalUserLinkParam] = None, **kwargs) -> None: # noqa: E501 + """Request External User Account Link # noqa: E501 + + Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_external_user_link(request_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param request_external_user_link_param: + :type request_external_user_link_param: RequestExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the request_external_user_link_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.request_external_user_link_with_http_info(request_external_user_link_param, **kwargs) # noqa: E501 + + @validate_arguments + def request_external_user_link_with_http_info(self, request_external_user_link_param : Optional[RequestExternalUserLinkParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Request External User Account Link # noqa: E501 + + Request to link an external account user. Get the email address of the user to be linked from the access token and send a verification code to that email address. The verification code is valid for 24 hours. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.request_external_user_link_with_http_info(request_external_user_link_param, async_req=True) + >>> result = thread.get() + + :param request_external_user_link_param: + :type request_external_user_link_param: RequestExternalUserLinkParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'request_external_user_link_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method request_external_user_link" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['request_external_user_link_param'] is not None: + _body_params = _params['request_external_user_link_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/external-users/request', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def resend_sign_up_confirmation_email(self, resend_sign_up_confirmation_email_param : Optional[ResendSignUpConfirmationEmailParam] = None, **kwargs) -> None: # noqa: E501 + """Resend Sign Up Confirmation Email # noqa: E501 + + Resend temporary password for the new registered user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.resend_sign_up_confirmation_email(resend_sign_up_confirmation_email_param, async_req=True) + >>> result = thread.get() + + :param resend_sign_up_confirmation_email_param: + :type resend_sign_up_confirmation_email_param: ResendSignUpConfirmationEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the resend_sign_up_confirmation_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.resend_sign_up_confirmation_email_with_http_info(resend_sign_up_confirmation_email_param, **kwargs) # noqa: E501 + + @validate_arguments + def resend_sign_up_confirmation_email_with_http_info(self, resend_sign_up_confirmation_email_param : Optional[ResendSignUpConfirmationEmailParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Resend Sign Up Confirmation Email # noqa: E501 + + Resend temporary password for the new registered user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.resend_sign_up_confirmation_email_with_http_info(resend_sign_up_confirmation_email_param, async_req=True) + >>> result = thread.get() + + :param resend_sign_up_confirmation_email_param: + :type resend_sign_up_confirmation_email_param: ResendSignUpConfirmationEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'resend_sign_up_confirmation_email_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method resend_sign_up_confirmation_email" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['resend_sign_up_confirmation_email_param'] is not None: + _body_params = _params['resend_sign_up_confirmation_email_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/sign-up/resend', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def sign_up(self, sign_up_param : Optional[SignUpParam] = None, **kwargs) -> SaasUser: # noqa: E501 + """Sign Up # noqa: E501 + + Register a new user. A temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up(sign_up_param, async_req=True) + >>> result = thread.get() + + :param sign_up_param: + :type sign_up_param: SignUpParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the sign_up_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.sign_up_with_http_info(sign_up_param, **kwargs) # noqa: E501 + + @validate_arguments + def sign_up_with_http_info(self, sign_up_param : Optional[SignUpParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Sign Up # noqa: E501 + + Register a new user. A temporary password will be sent to the registered email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up_with_http_info(sign_up_param, async_req=True) + >>> result = thread.get() + + :param sign_up_param: + :type sign_up_param: SignUpParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'sign_up_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sign_up" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['sign_up_param'] is not None: + _body_params = _params['sign_up_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SaasUser", + '500': "Error", + } + + return self.api_client.call_api( + '/sign-up', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def sign_up_with_aws_marketplace(self, sign_up_with_aws_marketplace_param : Optional[SignUpWithAwsMarketplaceParam] = None, **kwargs) -> SaasUser: # noqa: E501 + """Sign Up with AWS Marketplace # noqa: E501 + + Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up_with_aws_marketplace(sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param sign_up_with_aws_marketplace_param: + :type sign_up_with_aws_marketplace_param: SignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SaasUser + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the sign_up_with_aws_marketplace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.sign_up_with_aws_marketplace_with_http_info(sign_up_with_aws_marketplace_param, **kwargs) # noqa: E501 + + @validate_arguments + def sign_up_with_aws_marketplace_with_http_info(self, sign_up_with_aws_marketplace_param : Optional[SignUpWithAwsMarketplaceParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Sign Up with AWS Marketplace # noqa: E501 + + Register a new user linked to AWS Marketplace. A temporary password will be sent to the registered email. If the Registration Token is not valid, an error is returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sign_up_with_aws_marketplace_with_http_info(sign_up_with_aws_marketplace_param, async_req=True) + >>> result = thread.get() + + :param sign_up_with_aws_marketplace_param: + :type sign_up_with_aws_marketplace_param: SignUpWithAwsMarketplaceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SaasUser, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'sign_up_with_aws_marketplace_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sign_up_with_aws_marketplace" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['sign_up_with_aws_marketplace_param'] is not None: + _body_params = _params['sign_up_with_aws_marketplace_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "SaasUser", + '500': "Error", + } + + return self.api_client.call_api( + '/aws-marketplace/sign-up', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def unlink_provider(self, provider_name : StrictStr, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> None: # noqa: E501 + """Unlink external identity providers # noqa: E501 + + Unlink external identity providers. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.unlink_provider(provider_name, user_id, async_req=True) + >>> result = thread.get() + + :param provider_name: (required) + :type provider_name: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the unlink_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.unlink_provider_with_http_info(provider_name, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def unlink_provider_with_http_info(self, provider_name : StrictStr, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Unlink external identity providers # noqa: E501 + + Unlink external identity providers. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.unlink_provider_with_http_info(provider_name, user_id, async_req=True) + >>> result = thread.get() + + :param provider_name: (required) + :type provider_name: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'provider_name', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method unlink_provider" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['provider_name']: + _path_params['provider_name'] = _params['provider_name'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/providers/{provider_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_saas_user_attributes(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_attributes_param : Optional[UpdateSaasUserAttributesParam] = None, **kwargs) -> None: # noqa: E501 + """Update SaaS User Attributes # noqa: E501 + + Update the additional attributes of the SaaS user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_attributes(user_id, update_saas_user_attributes_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_attributes_param: + :type update_saas_user_attributes_param: UpdateSaasUserAttributesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_saas_user_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_saas_user_attributes_with_http_info(user_id, update_saas_user_attributes_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_saas_user_attributes_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_attributes_param : Optional[UpdateSaasUserAttributesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update SaaS User Attributes # noqa: E501 + + Update the additional attributes of the SaaS user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_attributes_with_http_info(user_id, update_saas_user_attributes_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_attributes_param: + :type update_saas_user_attributes_param: UpdateSaasUserAttributesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_saas_user_attributes_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_saas_user_attributes" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_saas_user_attributes_param'] is not None: + _body_params = _params['update_saas_user_attributes_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/attributes', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_saas_user_email(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_email_param : Optional[UpdateSaasUserEmailParam] = None, **kwargs) -> None: # noqa: E501 + """Change Email # noqa: E501 + + Change user's email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_email(user_id, update_saas_user_email_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_email_param: + :type update_saas_user_email_param: UpdateSaasUserEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_saas_user_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_saas_user_email_with_http_info(user_id, update_saas_user_email_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_saas_user_email_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_email_param : Optional[UpdateSaasUserEmailParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Change Email # noqa: E501 + + Change user's email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_email_with_http_info(user_id, update_saas_user_email_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_email_param: + :type update_saas_user_email_param: UpdateSaasUserEmailParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_saas_user_email_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_saas_user_email" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_saas_user_email_param'] is not None: + _body_params = _params['update_saas_user_email_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/email', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_saas_user_password(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_password_param : Optional[UpdateSaasUserPasswordParam] = None, **kwargs) -> None: # noqa: E501 + """Change Password # noqa: E501 + + Change user's login password. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_password(user_id, update_saas_user_password_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_password_param: + :type update_saas_user_password_param: UpdateSaasUserPasswordParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_saas_user_password_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_saas_user_password_with_http_info(user_id, update_saas_user_password_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_saas_user_password_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_saas_user_password_param : Optional[UpdateSaasUserPasswordParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Change Password # noqa: E501 + + Change user's login password. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_saas_user_password_with_http_info(user_id, update_saas_user_password_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_saas_user_password_param: + :type update_saas_user_password_param: UpdateSaasUserPasswordParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_saas_user_password_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_saas_user_password" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_saas_user_password_param'] is not None: + _body_params = _params['update_saas_user_password_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/password', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_software_token(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_software_token_param : Optional[UpdateSoftwareTokenParam] = None, **kwargs) -> None: # noqa: E501 + """Register Authentication Application # noqa: E501 + + Register an authentication application. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_software_token(user_id, update_software_token_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_software_token_param: + :type update_software_token_param: UpdateSoftwareTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_software_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_software_token_with_http_info(user_id, update_software_token_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_software_token_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], update_software_token_param : Optional[UpdateSoftwareTokenParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Register Authentication Application # noqa: E501 + + Register an authentication application. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_software_token_with_http_info(user_id, update_software_token_param, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param update_software_token_param: + :type update_software_token_param: UpdateSoftwareTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'update_software_token_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_software_token" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_software_token_param'] is not None: + _body_params = _params['update_software_token_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/mfa/software-token', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_user_mfa_preference(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], body : Optional[MfaPreference] = None, **kwargs) -> None: # noqa: E501 + """Update User's MFA Settings # noqa: E501 + + Update user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_user_mfa_preference(user_id, body, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param body: + :type body: MfaPreference + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_user_mfa_preference_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_user_mfa_preference_with_http_info(user_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_user_mfa_preference_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], body : Optional[MfaPreference] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update User's MFA Settings # noqa: E501 + + Update user's MFA settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_user_mfa_preference_with_http_info(user_id, body, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param body: + :type body: MfaPreference + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'user_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_user_mfa_preference" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/users/{user_id}/mfa/preference', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/single_tenant_api.py b/test/auth/api/single_tenant_api.py new file mode 100644 index 0000000..14613b6 --- /dev/null +++ b/test/auth/api/single_tenant_api.py @@ -0,0 +1,452 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SingleTenantApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_cloud_formation_launch_stack_link_for_single_tenant(self, **kwargs) -> CloudFormationLaunchStackLink: # noqa: E501 + """Get CloudFormation Stack Launch Link For Single Tenant # noqa: E501 + + Get the CloudFormation stack activation link for Single Tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link_for_single_tenant(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CloudFormationLaunchStackLink + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get CloudFormation Stack Launch Link For Single Tenant # noqa: E501 + + Get the CloudFormation stack activation link for Single Tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link_for_single_tenant_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CloudFormationLaunchStackLink, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cloud_formation_launch_stack_link_for_single_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CloudFormationLaunchStackLink", + '500': "Error", + } + + return self.api_client.call_api( + '/single-tenant/cloudformation-launch-stack-link', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_single_tenant_settings(self, **kwargs) -> SingleTenantSettings: # noqa: E501 + """Retrieve the settings of the single tenant. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_single_tenant_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SingleTenantSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_single_tenant_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_single_tenant_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_single_tenant_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Retrieve the settings of the single tenant. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_single_tenant_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SingleTenantSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_single_tenant_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "SingleTenantSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/single-tenant/settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_single_tenant_settings(self, update_single_tenant_settings_param : Optional[UpdateSingleTenantSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update configuration information for single-tenant functionality # noqa: E501 + + Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_single_tenant_settings(update_single_tenant_settings_param, async_req=True) + >>> result = thread.get() + + :param update_single_tenant_settings_param: + :type update_single_tenant_settings_param: UpdateSingleTenantSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_single_tenant_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_single_tenant_settings_with_http_info(update_single_tenant_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_single_tenant_settings_with_http_info(self, update_single_tenant_settings_param : Optional[UpdateSingleTenantSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update configuration information for single-tenant functionality # noqa: E501 + + Updates configuration information for single-tenant functionality Returns error if single tenant feature cannot be enabled. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_single_tenant_settings_with_http_info(update_single_tenant_settings_param, async_req=True) + >>> result = thread.get() + + :param update_single_tenant_settings_param: + :type update_single_tenant_settings_param: UpdateSingleTenantSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_single_tenant_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_single_tenant_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_single_tenant_settings_param'] is not None: + _body_params = _params['update_single_tenant_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/single-tenant/settings', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/tenant_api.py b/test/auth/api/tenant_api.py new file mode 100644 index 0000000..7d06488 --- /dev/null +++ b/test/auth/api/tenant_api.py @@ -0,0 +1,1886 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TenantApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant(self, body : Optional[TenantProps] = None, **kwargs) -> Tenant: # noqa: E501 + """Create Tenant # noqa: E501 + + Create a tenant managed by the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Tenant + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_with_http_info(self, body : Optional[TenantProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant # noqa: E501 + + Create a tenant managed by the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Tenant, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Tenant", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_tenant_and_pricing(self, **kwargs) -> None: # noqa: E501 + """Stripe Initial Setting # noqa: E501 + + Set Stripe initial information via billing # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_and_pricing(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_and_pricing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_and_pricing_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_and_pricing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Stripe Initial Setting # noqa: E501 + + Set Stripe initial information via billing # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_and_pricing_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_and_pricing" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/init', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_stripe_tenant_and_pricing(self, **kwargs) -> None: # noqa: E501 + """Delete Customer and Product From Stripe # noqa: E501 + + Delete customer and product from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_tenant_and_pricing(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_stripe_tenant_and_pricing_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_stripe_tenant_and_pricing_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_stripe_tenant_and_pricing_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Customer and Product From Stripe # noqa: E501 + + Delete customer and product from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_tenant_and_pricing_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stripe_tenant_and_pricing" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> None: # noqa: E501 + """Delete Tenant # noqa: E501 + + Delete SaaSus Platform tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant # noqa: E501 + + Delete SaaSus Platform tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_stripe_customer(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> StripeCustomer: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: StripeCustomer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_stripe_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_stripe_customer_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_stripe_customer_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StripeCustomer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stripe_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "StripeCustomer", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/stripe-customer', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> TenantDetail: # noqa: E501 + """Get Tenant Details # noqa: E501 + + Get the details of tenant managed on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TenantDetail + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Details # noqa: E501 + + Get the details of tenant managed on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TenantDetail, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TenantDetail", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_identity_providers(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> TenantIdentityProviders: # noqa: E501 + """Get identity provider per tenant # noqa: E501 + + Get sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_identity_providers(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TenantIdentityProviders + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_identity_providers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_identity_providers_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_identity_providers_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get identity provider per tenant # noqa: E501 + + Get sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_identity_providers_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TenantIdentityProviders, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_identity_providers" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TenantIdentityProviders", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/identity-providers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenants(self, **kwargs) -> Tenants: # noqa: E501 + """Get Tenants # noqa: E501 + + Get tenants managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenants(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Tenants + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenants_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenants_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_tenants_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenants # noqa: E501 + + Get tenants managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenants_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Tenants, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenants" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Tenants", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def reset_plan(self, **kwargs) -> None: # noqa: E501 + """Delete all information related to rate plans # noqa: E501 + + Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reset_plan(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the reset_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.reset_plan_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def reset_plan_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete all information related to rate plans # noqa: E501 + + Delete all information related to rate plans. Delete plans linked to tenants and plan definitions. If you are using the Stripe linkage, the linkage will be removed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reset_plan_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method reset_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/reset', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[TenantProps] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant Details # noqa: E501 + + Update SaaSus Platform tenant details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_with_http_info(tenant_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[TenantProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant Details # noqa: E501 + + Update SaaSus Platform tenant details. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_with_http_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: TenantProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_billing_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[BillingInfo] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant Billing Information # noqa: E501 + + Update SaaSus Platform tenant billing information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_billing_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: BillingInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_billing_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_billing_info_with_http_info(tenant_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_billing_info_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[BillingInfo] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant Billing Information # noqa: E501 + + Update SaaSus Platform tenant billing information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_billing_info_with_http_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: BillingInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_billing_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/billing-info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_identity_provider(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], update_tenant_identity_provider_param : Optional[UpdateTenantIdentityProviderParam] = None, **kwargs) -> None: # noqa: E501 + """Update identity provider per tenant # noqa: E501 + + Update sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_identity_provider(tenant_id, update_tenant_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param update_tenant_identity_provider_param: + :type update_tenant_identity_provider_param: UpdateTenantIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_identity_provider_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_identity_provider_with_http_info(tenant_id, update_tenant_identity_provider_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_identity_provider_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], update_tenant_identity_provider_param : Optional[UpdateTenantIdentityProviderParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update identity provider per tenant # noqa: E501 + + Update sign-in information via external identity provider per tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_identity_provider_with_http_info(tenant_id, update_tenant_identity_provider_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param update_tenant_identity_provider_param: + :type update_tenant_identity_provider_param: UpdateTenantIdentityProviderParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'update_tenant_identity_provider_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_identity_provider" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_tenant_identity_provider_param'] is not None: + _body_params = _params['update_tenant_identity_provider_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/identity-providers', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_plan(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[PlanReservation] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant Plan Information # noqa: E501 + + Update SaaSus Platform tenant plan information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_plan(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: PlanReservation + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_plan_with_http_info(tenant_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_plan_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], body : Optional[PlanReservation] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant Plan Information # noqa: E501 + + Update SaaSus Platform tenant plan information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_plan_with_http_info(tenant_id, body, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param body: + :type body: PlanReservation + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/plans', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/tenant_attribute_api.py b/test/auth/api/tenant_attribute_api.py new file mode 100644 index 0000000..6cce104 --- /dev/null +++ b/test/auth/api/tenant_attribute_api.py @@ -0,0 +1,463 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TenantAttributeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 + """Create Tenant Attribute # noqa: E501 + + Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_attribute(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Attribute + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_attribute_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant Attribute # noqa: E501 + + Register additional tenant attributes to be managed by SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_attribute_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Attribute", + '500': "Error", + } + + return self.api_client.call_api( + '/tenant-attributes', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_attribute(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> None: # noqa: E501 + """Delete Tenant Attribute # noqa: E501 + + Deletes tenant attributes managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_attribute(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_attribute_with_http_info(attribute_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_attribute_with_http_info(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant Attribute # noqa: E501 + + Deletes tenant attributes managed by SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_attribute_with_http_info(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'attribute_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['attribute_name']: + _path_params['attribute_name'] = _params['attribute_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenant-attributes/{attribute_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_attributes(self, **kwargs) -> TenantAttributes: # noqa: E501 + """Get Tenant Attributes # noqa: E501 + + Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_attributes(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TenantAttributes + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_attributes_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_attributes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Attributes # noqa: E501 + + Get definitions for additional tenant attributes managed by the SaaSus Platform. For example, tenant name, memo, etc., then get the attributes from SaaS using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_attributes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TenantAttributes, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_attributes" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TenantAttributes", + '500': "Error", + } + + return self.api_client.call_api( + '/tenant-attributes', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/tenant_user_api.py b/test/auth/api/tenant_user_api.py new file mode 100644 index 0000000..570ceb0 --- /dev/null +++ b/test/auth/api/tenant_user_api.py @@ -0,0 +1,1401 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.models.users import Users + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TenantUserApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_user_param : Optional[CreateTenantUserParam] = None, **kwargs) -> User: # noqa: E501 + """Create Tenant User # noqa: E501 + + Create a tenant user. If attributes is empty, the additional attributes will be created empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user(tenant_id, create_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_user_param: + :type create_tenant_user_param: CreateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: User + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_user_with_http_info(tenant_id, create_tenant_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], create_tenant_user_param : Optional[CreateTenantUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant User # noqa: E501 + + Create a tenant user. If attributes is empty, the additional attributes will be created empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user_with_http_info(tenant_id, create_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param create_tenant_user_param: + :type create_tenant_user_param: CreateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'create_tenant_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_tenant_user_param'] is not None: + _body_params = _params['create_tenant_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "User", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_tenant_user_roles(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], create_tenant_user_roles_param : Optional[CreateTenantUserRolesParam] = None, **kwargs) -> None: # noqa: E501 + """Create Tenant User Role # noqa: E501 + + Create roles on tenant users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user_roles(tenant_id, user_id, env_id, create_tenant_user_roles_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param create_tenant_user_roles_param: + :type create_tenant_user_roles_param: CreateTenantUserRolesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tenant_user_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tenant_user_roles_with_http_info(tenant_id, user_id, env_id, create_tenant_user_roles_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_tenant_user_roles_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], create_tenant_user_roles_param : Optional[CreateTenantUserRolesParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tenant User Role # noqa: E501 + + Create roles on tenant users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tenant_user_roles_with_http_info(tenant_id, user_id, env_id, create_tenant_user_roles_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param create_tenant_user_roles_param: + :type create_tenant_user_roles_param: CreateTenantUserRolesParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id', + 'env_id', + 'create_tenant_user_roles_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tenant_user_roles" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_tenant_user_roles_param'] is not None: + _body_params = _params['create_tenant_user_roles_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> None: # noqa: E501 + """Delete Tenant User # noqa: E501 + + Delete a user from the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_user_with_http_info(tenant_id, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Tenant User # noqa: E501 + + Delete a user from the tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user_with_http_info(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_tenant_user_role(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> None: # noqa: E501 + """Remove Role From Tenant User # noqa: E501 + + Remove a role from a tenant user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user_role(tenant_id, user_id, env_id, role_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_tenant_user_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_tenant_user_role_with_http_info(tenant_id, user_id, env_id, role_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_tenant_user_role_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], env_id : Annotated[StrictInt, Field(..., description="Env ID")], role_name : Annotated[StrictStr, Field(..., description="Role name")], **kwargs) -> ApiResponse: # noqa: E501 + """Remove Role From Tenant User # noqa: E501 + + Remove a role from a tenant user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tenant_user_role_with_http_info(tenant_id, user_id, env_id, role_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param env_id: Env ID (required) + :type env_id: int + :param role_name: Role name (required) + :type role_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id', + 'env_id', + 'role_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_tenant_user_role" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + if _params['env_id']: + _path_params['env_id'] = _params['env_id'] + + if _params['role_name']: + _path_params['role_name'] = _params['role_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}/envs/{env_id}/roles/{role_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_all_tenant_user(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> Users: # noqa: E501 + """Get User Info # noqa: E501 + + Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_user(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Users + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_all_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_all_tenant_user_with_http_info(user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_all_tenant_user_with_http_info(self, user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User Info # noqa: E501 + + Get information on user belonging to the tenant from the user ID. If the user belongs to multiple tenants, it will be returned as another object. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_user_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Users", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/all/users/{user_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_all_tenant_users(self, **kwargs) -> Users: # noqa: E501 + """Get Users # noqa: E501 + + Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_users(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Users + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_all_tenant_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_all_tenant_users_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_all_tenant_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Users # noqa: E501 + + Get all users belonging to the tenant. The same user belonging to multiple tenants will be returned as a different object. Id is not unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_tenant_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_tenant_users" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Users", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/all/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> User: # noqa: E501 + """Get Tenant User # noqa: E501 + + Get one tenant user by specific ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_user(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: User + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_user_with_http_info(tenant_id, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant User # noqa: E501 + + Get one tenant user by specific ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_user_with_http_info(tenant_id, user_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "User", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tenant_users(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> Users: # noqa: E501 + """Get Tenant Users # noqa: E501 + + Get all the users belonging to the tenant. Id is unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_users(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Users + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tenant_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tenant_users_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_tenant_users_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Tenant Users # noqa: E501 + + Get all the users belonging to the tenant. Id is unique. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tenant_users_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Users, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_users" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Users", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tenant_user(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], update_tenant_user_param : Optional[UpdateTenantUserParam] = None, **kwargs) -> None: # noqa: E501 + """Update Tenant User Attribute # noqa: E501 + + Update tenant user attributes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_user(tenant_id, user_id, update_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param update_tenant_user_param: + :type update_tenant_user_param: UpdateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tenant_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tenant_user_with_http_info(tenant_id, user_id, update_tenant_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_tenant_user_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], user_id : Annotated[StrictStr, Field(..., description="User ID")], update_tenant_user_param : Optional[UpdateTenantUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tenant User Attribute # noqa: E501 + + Update tenant user attributes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tenant_user_with_http_info(tenant_id, user_id, update_tenant_user_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param user_id: User ID (required) + :type user_id: str + :param update_tenant_user_param: + :type update_tenant_user_param: UpdateTenantUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'user_id', + 'update_tenant_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tenant_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_tenant_user_param'] is not None: + _body_params = _params['update_tenant_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tenants/{tenant_id}/users/{user_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/user_attribute_api.py b/test/auth/api/user_attribute_api.py new file mode 100644 index 0000000..47aa8cc --- /dev/null +++ b/test/auth/api/user_attribute_api.py @@ -0,0 +1,610 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UserAttributeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_saas_user_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 + """Create SaaS User Attributes # noqa: E501 + + Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user_attribute(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Attribute + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_saas_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_saas_user_attribute_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_saas_user_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create SaaS User Attributes # noqa: E501 + + Create additional SaaS user attributes to be kept on the SaaSus Platform. You can give common values to all tenants. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_saas_user_attribute_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_saas_user_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Attribute", + '500': "Error", + } + + return self.api_client.call_api( + '/saas-user-attributes', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_user_attribute(self, body : Optional[Attribute] = None, **kwargs) -> Attribute: # noqa: E501 + """Create User Attributes # noqa: E501 + + Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_user_attribute(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Attribute + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_user_attribute_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_user_attribute_with_http_info(self, body : Optional[Attribute] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create User Attributes # noqa: E501 + + Create additional user attributes to be kept on the SaaSus Platform. You can give different values to each tenant. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_user_attribute_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: Attribute + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Attribute, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_user_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Attribute", + '500': "Error", + } + + return self.api_client.call_api( + '/user-attributes', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_user_attribute(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> None: # noqa: E501 + """Delete User Attribute # noqa: E501 + + Delete user attributes kept on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user_attribute(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_user_attribute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_user_attribute_with_http_info(attribute_name, **kwargs) # noqa: E501 + + @validate_arguments + def delete_user_attribute_with_http_info(self, attribute_name : Annotated[StrictStr, Field(..., description="Attribute Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete User Attribute # noqa: E501 + + Delete user attributes kept on the SaaSus Platform. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user_attribute_with_http_info(attribute_name, async_req=True) + >>> result = thread.get() + + :param attribute_name: Attribute Name (required) + :type attribute_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'attribute_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user_attribute" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['attribute_name']: + _path_params['attribute_name'] = _params['attribute_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/user-attributes/{attribute_name}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_user_attributes(self, **kwargs) -> UserAttributes: # noqa: E501 + """Get User Attributes # noqa: E501 + + Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_attributes(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserAttributes + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_attributes_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_attributes_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_user_attributes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get User Attributes # noqa: E501 + + Get additional attributes of the user saved in the SaaSus Platform. For example, you can define items associated with a user, such as user name, birthday, etc. If you don't want personal information on the SaaS Platform side, personal information can be kept on the SaaS side without user attribute definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_attributes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserAttributes, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_attributes" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "UserAttributes", + '500': "Error", + } + + return self.api_client.call_api( + '/user-attributes', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api/user_info_api.py b/test/auth/api/user_info_api.py new file mode 100644 index 0000000..e971797 --- /dev/null +++ b/test/auth/api/user_info_api.py @@ -0,0 +1,326 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from saasus_sdk_python.src.auth.models.user_info import UserInfo + +from saasus_sdk_python.src.auth.api_client import ApiClient +from saasus_sdk_python.src.auth.api_response import ApiResponse +from saasus_sdk_python.src.auth.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class UserInfoApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def get_user_info(self, token : Annotated[StrictStr, Field(..., description="ID Token")], **kwargs) -> UserInfo: # noqa: E501 + """Get User Info # noqa: E501 + + User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info(token, async_req=True) + >>> result = thread.get() + + :param token: ID Token (required) + :type token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_info_with_http_info(token, **kwargs) # noqa: E501 + + @validate_arguments + def get_user_info_with_http_info(self, token : Annotated[StrictStr, Field(..., description="ID Token")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User Info # noqa: E501 + + User information is obtained based on the ID token of the SaaS user (registered user). The ID token is passed to the Callback URL during login from the SaaSus Platform generated login screen. User information can be obtained from calling this API with an ID token from the URL on the server side. Since the acquired tenant, role (role), price plan, etc. are included, it is possible to implement authorization based on it. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info_with_http_info(token, async_req=True) + >>> result = thread.get() + + :param token: ID Token (required) + :type token: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'token' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('token') is not None: # noqa: E501 + _query_params.append(('token', _params['token'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "UserInfo", + '401': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/userinfo', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_user_info_by_email(self, email : Annotated[StrictStr, Field(..., description="Email")], **kwargs) -> UserInfo: # noqa: E501 + """Get User Info by Email # noqa: E501 + + Get user information by email address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info_by_email(email, async_req=True) + >>> result = thread.get() + + :param email: Email (required) + :type email: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_user_info_by_email_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_user_info_by_email_with_http_info(email, **kwargs) # noqa: E501 + + @validate_arguments + def get_user_info_by_email_with_http_info(self, email : Annotated[StrictStr, Field(..., description="Email")], **kwargs) -> ApiResponse: # noqa: E501 + """Get User Info by Email # noqa: E501 + + Get user information by email address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_info_by_email_with_http_info(email, async_req=True) + >>> result = thread.get() + + :param email: Email (required) + :type email: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'email' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_info_by_email" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('email') is not None: # noqa: E501 + _query_params.append(('email', _params['email'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "UserInfo", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/userinfo/search/email', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/auth/api_client.py b/test/auth/api_client.py new file mode 100644 index 0000000..f86e35d --- /dev/null +++ b/test/auth/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.auth.configuration import Configuration +from saasus_sdk_python.src.auth.api_response import ApiResponse +import saasus_sdk_python.src.auth.models +from saasus_sdk_python.src.auth import rest +from saasus_sdk_python.src.auth.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.auth.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/auth/api_response.py b/test/auth/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/auth/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/auth/configuration.py b/test/auth/configuration.py new file mode 100644 index 0000000..b97d621 --- /dev/null +++ b/test/auth/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.auth.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/auth" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.auth") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/auth", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/auth/exceptions.py b/test/auth/exceptions.py new file mode 100644 index 0000000..9e8bf2a --- /dev/null +++ b/test/auth/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/auth/models/__init__.py b/test/auth/models/__init__.py new file mode 100644 index 0000000..083e14d --- /dev/null +++ b/test/auth/models/__init__.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.api_keys import ApiKeys +from saasus_sdk_python.src.auth.models.attribute import Attribute +from saasus_sdk_python.src.auth.models.attribute_type import AttributeType +from saasus_sdk_python.src.auth.models.auth_info import AuthInfo +from saasus_sdk_python.src.auth.models.authorization_temp_code import AuthorizationTempCode +from saasus_sdk_python.src.auth.models.basic_info import BasicInfo +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.client_secret import ClientSecret +from saasus_sdk_python.src.auth.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.auth.models.confirm_email_update_param import ConfirmEmailUpdateParam +from saasus_sdk_python.src.auth.models.confirm_external_user_link_param import ConfirmExternalUserLinkParam +from saasus_sdk_python.src.auth.models.confirm_sign_up_with_aws_marketplace_param import ConfirmSignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.create_saas_user_param import CreateSaasUserParam +from saasus_sdk_python.src.auth.models.create_secret_code_param import CreateSecretCodeParam +from saasus_sdk_python.src.auth.models.create_tenant_invitation_param import CreateTenantInvitationParam +from saasus_sdk_python.src.auth.models.create_tenant_user_param import CreateTenantUserParam +from saasus_sdk_python.src.auth.models.create_tenant_user_roles_param import CreateTenantUserRolesParam +from saasus_sdk_python.src.auth.models.credentials import Credentials +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps +from saasus_sdk_python.src.auth.models.customize_page_settings import CustomizePageSettings +from saasus_sdk_python.src.auth.models.customize_page_settings_props import CustomizePageSettingsProps +from saasus_sdk_python.src.auth.models.customize_pages import CustomizePages +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord +from saasus_sdk_python.src.auth.models.env import Env +from saasus_sdk_python.src.auth.models.envs import Envs +from saasus_sdk_python.src.auth.models.error import Error +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml +from saasus_sdk_python.src.auth.models.identity_providers import IdentityProviders +from saasus_sdk_python.src.auth.models.invitation import Invitation +from saasus_sdk_python.src.auth.models.invitation_status import InvitationStatus +from saasus_sdk_python.src.auth.models.invitation_validity import InvitationValidity +from saasus_sdk_python.src.auth.models.invitations import Invitations +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner +from saasus_sdk_python.src.auth.models.invoice_language import InvoiceLanguage +from saasus_sdk_python.src.auth.models.link_aws_marketplace_param import LinkAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.mfa_preference import MfaPreference +from saasus_sdk_python.src.auth.models.notification_messages import NotificationMessages +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.plan_histories import PlanHistories +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from saasus_sdk_python.src.auth.models.provider_name import ProviderName +from saasus_sdk_python.src.auth.models.provider_type import ProviderType +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.request_email_update_param import RequestEmailUpdateParam +from saasus_sdk_python.src.auth.models.request_external_user_link_param import RequestExternalUserLinkParam +from saasus_sdk_python.src.auth.models.resend_sign_up_confirmation_email_param import ResendSignUpConfirmationEmailParam +from saasus_sdk_python.src.auth.models.role import Role +from saasus_sdk_python.src.auth.models.roles import Roles +from saasus_sdk_python.src.auth.models.saas_id import SaasId +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from saasus_sdk_python.src.auth.models.saas_users import SaasUsers +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist +from saasus_sdk_python.src.auth.models.sign_in_settings import SignInSettings +from saasus_sdk_python.src.auth.models.sign_up_param import SignUpParam +from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam +from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings +from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.models.tenant import Tenant +from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes +from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps +from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml +from saasus_sdk_python.src.auth.models.tenant_props import TenantProps +from saasus_sdk_python.src.auth.models.tenants import Tenants +from saasus_sdk_python.src.auth.models.update_basic_info_param import UpdateBasicInfoParam +from saasus_sdk_python.src.auth.models.update_customize_page_settings_param import UpdateCustomizePageSettingsParam +from saasus_sdk_python.src.auth.models.update_customize_pages_param import UpdateCustomizePagesParam +from saasus_sdk_python.src.auth.models.update_env_param import UpdateEnvParam +from saasus_sdk_python.src.auth.models.update_identity_provider_param import UpdateIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_notification_messages_param import UpdateNotificationMessagesParam +from saasus_sdk_python.src.auth.models.update_saas_user_attributes_param import UpdateSaasUserAttributesParam +from saasus_sdk_python.src.auth.models.update_saas_user_email_param import UpdateSaasUserEmailParam +from saasus_sdk_python.src.auth.models.update_saas_user_password_param import UpdateSaasUserPasswordParam +from saasus_sdk_python.src.auth.models.update_sign_in_settings_param import UpdateSignInSettingsParam +from saasus_sdk_python.src.auth.models.update_single_tenant_settings_param import UpdateSingleTenantSettingsParam +from saasus_sdk_python.src.auth.models.update_software_token_param import UpdateSoftwareTokenParam +from saasus_sdk_python.src.auth.models.update_tenant_identity_provider_param import UpdateTenantIdentityProviderParam +from saasus_sdk_python.src.auth.models.update_tenant_user_param import UpdateTenantUserParam +from saasus_sdk_python.src.auth.models.user import User +from saasus_sdk_python.src.auth.models.user_attributes import UserAttributes +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant +from saasus_sdk_python.src.auth.models.user_info import UserInfo +from saasus_sdk_python.src.auth.models.users import Users +from saasus_sdk_python.src.auth.models.validate_invitation_param import ValidateInvitationParam diff --git a/test/auth/models/account_verification.py b/test/auth/models/account_verification.py new file mode 100644 index 0000000..6f2b9a0 --- /dev/null +++ b/test/auth/models/account_verification.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class AccountVerification(BaseModel): + """ + Account authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + """ + verification_method: StrictStr = Field(..., description="code: verification code link: verification link ※ This function is not yet provided, so it cannot be changed or saved. ") + sending_to: StrictStr = Field(..., description="email: e-mail sms: SMS smsOrEmail: email if SMS is not possible ") + __properties = ["verification_method", "sending_to"] + + @field_validator('verification_method') + @classmethod + def verification_method_validate_enum(cls, value): + """Validates the enum""" + if value not in ('code', 'link'): + raise ValueError("must be one of enum values ('code', 'link')") + return value + + @field_validator('sending_to') + @classmethod + def sending_to_validate_enum(cls, value): + """Validates the enum""" + if value not in ('email', 'sms', 'smsOrEmail'): + raise ValueError("must be one of enum values ('email', 'sms', 'smsOrEmail')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> AccountVerification: + """Create an instance of AccountVerification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AccountVerification: + """Create an instance of AccountVerification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return AccountVerification.parse_obj(obj) + + _obj = AccountVerification.parse_obj({ + "verification_method": obj.get("verification_method"), + "sending_to": obj.get("sending_to") + }) + return _obj + + diff --git a/test/auth/models/api_keys.py b/test/auth/models/api_keys.py new file mode 100644 index 0000000..ebfc6c8 --- /dev/null +++ b/test/auth/models/api_keys.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class ApiKeys(BaseModel): + """ + ApiKeys + """ + api_keys: Annotated[List[StrictStr], Field()] = Field(..., description="API Key") + __properties = ["api_keys"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ApiKeys: + """Create an instance of ApiKeys from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ApiKeys: + """Create an instance of ApiKeys from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ApiKeys.parse_obj(obj) + + _obj = ApiKeys.parse_obj({ + "api_keys": obj.get("api_keys") + }) + return _obj + + diff --git a/test/auth/models/attribute.py b/test/auth/models/attribute.py new file mode 100644 index 0000000..47d7cbd --- /dev/null +++ b/test/auth/models/attribute.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.attribute_type import AttributeType + +class Attribute(BaseModel): + """ + Attribute + """ + attribute_name: StrictStr = Field(..., description="Attribute Name") + display_name: StrictStr = Field(..., description="Display Name") + attribute_type: AttributeType = Field(...) + __properties = ["attribute_name", "display_name", "attribute_type"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Attribute: + """Create an instance of Attribute from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Attribute: + """Create an instance of Attribute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Attribute.parse_obj(obj) + + _obj = Attribute.parse_obj({ + "attribute_name": obj.get("attribute_name"), + "display_name": obj.get("display_name"), + "attribute_type": obj.get("attribute_type") + }) + return _obj + + diff --git a/test/auth/models/attribute_type.py b/test/auth/models/attribute_type.py new file mode 100644 index 0000000..df4b2bb --- /dev/null +++ b/test/auth/models/attribute_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class AttributeType(str, Enum): + """ + Type (date can be set to YYYY-MM-DD format.) + """ + + """ + allowed enum values + """ + STRING = 'string' + NUMBER = 'number' + BOOL = 'bool' + DATE = 'date' + + @classmethod + def from_json(cls, json_str: str) -> AttributeType: + """Create an instance of AttributeType from a JSON string""" + return AttributeType(json.loads(json_str)) + + diff --git a/test/auth/models/auth_info.py b/test/auth/models/auth_info.py new file mode 100644 index 0000000..ec22163 --- /dev/null +++ b/test/auth/models/auth_info.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class AuthInfo(BaseModel): + """ + AuthInfo + """ + callback_url: StrictStr = Field(..., description="Redirect After Authentication") + __properties = ["callback_url"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> AuthInfo: + """Create an instance of AuthInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AuthInfo: + """Create an instance of AuthInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return AuthInfo.parse_obj(obj) + + _obj = AuthInfo.parse_obj({ + "callback_url": obj.get("callback_url") + }) + return _obj + + diff --git a/test/auth/models/authorization_temp_code.py b/test/auth/models/authorization_temp_code.py new file mode 100644 index 0000000..60b3ca8 --- /dev/null +++ b/test/auth/models/authorization_temp_code.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class AuthorizationTempCode(BaseModel): + """ + AuthorizationTempCode + """ + code: StrictStr = Field(...) + __properties = ["code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> AuthorizationTempCode: + """Create an instance of AuthorizationTempCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> AuthorizationTempCode: + """Create an instance of AuthorizationTempCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return AuthorizationTempCode.parse_obj(obj) + + _obj = AuthorizationTempCode.parse_obj({ + "code": obj.get("code") + }) + return _obj + + diff --git a/test/auth/models/basic_info.py b/test/auth/models/basic_info.py new file mode 100644 index 0000000..ac9ba52 --- /dev/null +++ b/test/auth/models/basic_info.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.auth.models.dns_record import DnsRecord +from typing_extensions import Annotated + +class BasicInfo(BaseModel): + """ + BasicInfo + """ + domain_name: StrictStr = Field(..., description="Domain Name") + is_dns_validated: StrictBool = Field(..., description="DNS Record Verification Results") + certificate_dns_record: DnsRecord = Field(...) + cloud_front_dns_record: DnsRecord = Field(...) + dkim_dns_records: Annotated[List[DnsRecord], Field()] = Field(..., description="DKIM DNS Records") + default_domain_name: StrictStr = Field(..., description="Default Domain Name") + from_email_address: StrictStr = Field(..., description="Sender Email for Authentication Email") + reply_email_address: StrictStr = Field(..., description="Reply-from email address of authentication email") + is_ses_sandbox_granted: StrictBool = Field(..., description="SES sandbox release and Cognito SES configuration results") + __properties = ["domain_name", "is_dns_validated", "certificate_dns_record", "cloud_front_dns_record", "dkim_dns_records", "default_domain_name", "from_email_address", "reply_email_address", "is_ses_sandbox_granted"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> BasicInfo: + """Create an instance of BasicInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of certificate_dns_record + if self.certificate_dns_record: + _dict['certificate_dns_record'] = self.certificate_dns_record.to_dict() + # override the default output from pydantic by calling `to_dict()` of cloud_front_dns_record + if self.cloud_front_dns_record: + _dict['cloud_front_dns_record'] = self.cloud_front_dns_record.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in dkim_dns_records (list) + _items = [] + if self.dkim_dns_records: + for _item in self.dkim_dns_records: + if _item: + _items.append(_item.to_dict()) + _dict['dkim_dns_records'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BasicInfo: + """Create an instance of BasicInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return BasicInfo.parse_obj(obj) + + _obj = BasicInfo.parse_obj({ + "domain_name": obj.get("domain_name"), + "is_dns_validated": obj.get("is_dns_validated"), + "certificate_dns_record": DnsRecord.from_dict(obj.get("certificate_dns_record")) if obj.get("certificate_dns_record") is not None else None, + "cloud_front_dns_record": DnsRecord.from_dict(obj.get("cloud_front_dns_record")) if obj.get("cloud_front_dns_record") is not None else None, + "dkim_dns_records": [DnsRecord.from_dict(_item) for _item in obj.get("dkim_dns_records")] if obj.get("dkim_dns_records") is not None else None, + "default_domain_name": obj.get("default_domain_name"), + "from_email_address": obj.get("from_email_address"), + "reply_email_address": obj.get("reply_email_address"), + "is_ses_sandbox_granted": obj.get("is_ses_sandbox_granted") + }) + return _obj + + diff --git a/test/auth/models/billing_address.py b/test/auth/models/billing_address.py new file mode 100644 index 0000000..d842cf1 --- /dev/null +++ b/test/auth/models/billing_address.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import field_validator, StringConstraints, ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class BillingAddress(BaseModel): + """ + BillingAddress + """ + street: StrictStr = Field(..., description="Street address, apartment or suite number.") + city: StrictStr = Field(..., description="City, district, suburb, town, or village.") + state: StrictStr = Field(..., description="State name or abbreviation.") + country: Annotated[str, StringConstraints(strict=True)] = Field(..., description="Country of the address using ISO 3166-1 alpha-2 code.") + additional_address_info: Optional[StrictStr] = Field(None, description="Additional information about the address, such as a building name, floor, or department name.") + postal_code: StrictStr = Field(..., description="ZIP or postal code.") + __properties = ["street", "city", "state", "country", "additional_address_info", "postal_code"] + + @field_validator('country') + @classmethod + def country_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z]{2}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> BillingAddress: + """Create an instance of BillingAddress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BillingAddress: + """Create an instance of BillingAddress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return BillingAddress.parse_obj(obj) + + _obj = BillingAddress.parse_obj({ + "street": obj.get("street"), + "city": obj.get("city"), + "state": obj.get("state"), + "country": obj.get("country"), + "additional_address_info": obj.get("additional_address_info"), + "postal_code": obj.get("postal_code") + }) + return _obj + + diff --git a/test/auth/models/billing_info.py b/test/auth/models/billing_info.py new file mode 100644 index 0000000..bbbfe87 --- /dev/null +++ b/test/auth/models/billing_info.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.billing_address import BillingAddress +from saasus_sdk_python.src.auth.models.invoice_language import InvoiceLanguage + +class BillingInfo(BaseModel): + """ + BillingInfo + """ + name: StrictStr = Field(..., description="Tenant name for billing") + address: BillingAddress = Field(...) + invoice_language: InvoiceLanguage = Field(...) + __properties = ["name", "address", "invoice_language"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> BillingInfo: + """Create an instance of BillingInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> BillingInfo: + """Create an instance of BillingInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return BillingInfo.parse_obj(obj) + + _obj = BillingInfo.parse_obj({ + "name": obj.get("name"), + "address": BillingAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "invoice_language": obj.get("invoice_language") + }) + return _obj + + diff --git a/test/auth/models/client_secret.py b/test/auth/models/client_secret.py new file mode 100644 index 0000000..5fb42ad --- /dev/null +++ b/test/auth/models/client_secret.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ClientSecret(BaseModel): + """ + ClientSecret + """ + client_secret: StrictStr = Field(..., description="Client Secret") + __properties = ["client_secret"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ClientSecret: + """Create an instance of ClientSecret from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ClientSecret: + """Create an instance of ClientSecret from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ClientSecret.parse_obj(obj) + + _obj = ClientSecret.parse_obj({ + "client_secret": obj.get("client_secret") + }) + return _obj + + diff --git a/test/auth/models/cloud_formation_launch_stack_link.py b/test/auth/models/cloud_formation_launch_stack_link.py new file mode 100644 index 0000000..131d308 --- /dev/null +++ b/test/auth/models/cloud_formation_launch_stack_link.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CloudFormationLaunchStackLink(BaseModel): + """ + CloudFormationLaunchStackLink + """ + link: StrictStr = Field(...) + __properties = ["link"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CloudFormationLaunchStackLink.parse_obj(obj) + + _obj = CloudFormationLaunchStackLink.parse_obj({ + "link": obj.get("link") + }) + return _obj + + diff --git a/test/auth/models/confirm_email_update_param.py b/test/auth/models/confirm_email_update_param.py new file mode 100644 index 0000000..1821ff7 --- /dev/null +++ b/test/auth/models/confirm_email_update_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ConfirmEmailUpdateParam(BaseModel): + """ + ConfirmEmailUpdateParam + """ + code: StrictStr = Field(...) + access_token: StrictStr = Field(...) + __properties = ["code", "access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ConfirmEmailUpdateParam: + """Create an instance of ConfirmEmailUpdateParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ConfirmEmailUpdateParam: + """Create an instance of ConfirmEmailUpdateParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ConfirmEmailUpdateParam.parse_obj(obj) + + _obj = ConfirmEmailUpdateParam.parse_obj({ + "code": obj.get("code"), + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/test/auth/models/confirm_external_user_link_param.py b/test/auth/models/confirm_external_user_link_param.py new file mode 100644 index 0000000..9a47fb4 --- /dev/null +++ b/test/auth/models/confirm_external_user_link_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ConfirmExternalUserLinkParam(BaseModel): + """ + ConfirmExternalUserLinkParam + """ + access_token: StrictStr = Field(...) + code: StrictStr = Field(...) + __properties = ["access_token", "code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ConfirmExternalUserLinkParam: + """Create an instance of ConfirmExternalUserLinkParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ConfirmExternalUserLinkParam: + """Create an instance of ConfirmExternalUserLinkParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ConfirmExternalUserLinkParam.parse_obj(obj) + + _obj = ConfirmExternalUserLinkParam.parse_obj({ + "access_token": obj.get("access_token"), + "code": obj.get("code") + }) + return _obj + + diff --git a/test/auth/models/confirm_sign_up_with_aws_marketplace_param.py b/test/auth/models/confirm_sign_up_with_aws_marketplace_param.py new file mode 100644 index 0000000..bd409eb --- /dev/null +++ b/test/auth/models/confirm_sign_up_with_aws_marketplace_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class ConfirmSignUpWithAwsMarketplaceParam(BaseModel): + """ + ConfirmSignUpWithAwsMarketplaceParam + """ + tenant_name: Optional[StrictStr] = Field(None, description="Tenant name") + access_token: StrictStr = Field(..., description="Access token") + registration_token: StrictStr = Field(..., description="Registration Token") + __properties = ["tenant_name", "access_token", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ConfirmSignUpWithAwsMarketplaceParam: + """Create an instance of ConfirmSignUpWithAwsMarketplaceParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ConfirmSignUpWithAwsMarketplaceParam: + """Create an instance of ConfirmSignUpWithAwsMarketplaceParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ConfirmSignUpWithAwsMarketplaceParam.parse_obj(obj) + + _obj = ConfirmSignUpWithAwsMarketplaceParam.parse_obj({ + "tenant_name": obj.get("tenant_name"), + "access_token": obj.get("access_token"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/test/auth/models/create_saas_user_param.py b/test/auth/models/create_saas_user_param.py new file mode 100644 index 0000000..406e216 --- /dev/null +++ b/test/auth/models/create_saas_user_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class CreateSaasUserParam(BaseModel): + """ + CreateSaasUserParam + """ + email: StrictStr = Field(..., description="E-mail") + password: Optional[StrictStr] = Field(None, description="Password") + __properties = ["email", "password"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateSaasUserParam: + """Create an instance of CreateSaasUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateSaasUserParam: + """Create an instance of CreateSaasUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateSaasUserParam.parse_obj(obj) + + _obj = CreateSaasUserParam.parse_obj({ + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/test/auth/models/create_secret_code_param.py b/test/auth/models/create_secret_code_param.py new file mode 100644 index 0000000..8e873d4 --- /dev/null +++ b/test/auth/models/create_secret_code_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateSecretCodeParam(BaseModel): + """ + CreateSecretCodeParam + """ + access_token: StrictStr = Field(..., description="access token") + __properties = ["access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateSecretCodeParam: + """Create an instance of CreateSecretCodeParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateSecretCodeParam: + """Create an instance of CreateSecretCodeParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateSecretCodeParam.parse_obj(obj) + + _obj = CreateSecretCodeParam.parse_obj({ + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/test/auth/models/create_tenant_invitation_param.py b/test/auth/models/create_tenant_invitation_param.py new file mode 100644 index 0000000..6af8ffd --- /dev/null +++ b/test/auth/models/create_tenant_invitation_param.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.invited_user_environment_information_inner import InvitedUserEnvironmentInformationInner +from typing_extensions import Annotated + +class CreateTenantInvitationParam(BaseModel): + """ + CreateTenantInvitationParam + """ + email: StrictStr = Field(..., description="Email address of the user to be invited") + access_token: StrictStr = Field(..., description="Access token of the user who creates an invitation") + envs: Annotated[List[InvitedUserEnvironmentInformationInner], Field()] = Field(...) + __properties = ["email", "access_token", "envs"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateTenantInvitationParam: + """Create an instance of CreateTenantInvitationParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateTenantInvitationParam: + """Create an instance of CreateTenantInvitationParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateTenantInvitationParam.parse_obj(obj) + + _obj = CreateTenantInvitationParam.parse_obj({ + "email": obj.get("email"), + "access_token": obj.get("access_token"), + "envs": [InvitedUserEnvironmentInformationInner.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None + }) + return _obj + + diff --git a/test/auth/models/create_tenant_user_param.py b/test/auth/models/create_tenant_user_param.py new file mode 100644 index 0000000..434f53e --- /dev/null +++ b/test/auth/models/create_tenant_user_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class CreateTenantUserParam(BaseModel): + """ + CreateTenantUserParam + """ + email: StrictStr = Field(..., description="E-mail") + attributes: Dict[str, Any] = Field(..., description="Attribute information (Get information set by defining user attributes in the SaaS development console) ") + __properties = ["email", "attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateTenantUserParam: + """Create an instance of CreateTenantUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateTenantUserParam: + """Create an instance of CreateTenantUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateTenantUserParam.parse_obj(obj) + + _obj = CreateTenantUserParam.parse_obj({ + "email": obj.get("email"), + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/test/auth/models/create_tenant_user_roles_param.py b/test/auth/models/create_tenant_user_roles_param.py new file mode 100644 index 0000000..1fc87e7 --- /dev/null +++ b/test/auth/models/create_tenant_user_roles_param.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class CreateTenantUserRolesParam(BaseModel): + """ + CreateTenantUserRolesParam + """ + role_names: Annotated[List[StrictStr], Field()] = Field(..., description="Role Info") + __properties = ["role_names"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateTenantUserRolesParam: + """Create an instance of CreateTenantUserRolesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateTenantUserRolesParam: + """Create an instance of CreateTenantUserRolesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateTenantUserRolesParam.parse_obj(obj) + + _obj = CreateTenantUserRolesParam.parse_obj({ + "role_names": obj.get("role_names") + }) + return _obj + + diff --git a/test/auth/models/credentials.py b/test/auth/models/credentials.py new file mode 100644 index 0000000..cee5c65 --- /dev/null +++ b/test/auth/models/credentials.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class Credentials(BaseModel): + """ + Credentials + """ + id_token: StrictStr = Field(..., description="ID token") + access_token: StrictStr = Field(..., description="Access token") + refresh_token: Optional[StrictStr] = Field(None, description="Refresh token") + __properties = ["id_token", "access_token", "refresh_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Credentials: + """Create an instance of Credentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Credentials: + """Create an instance of Credentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Credentials.parse_obj(obj) + + _obj = Credentials.parse_obj({ + "id_token": obj.get("id_token"), + "access_token": obj.get("access_token"), + "refresh_token": obj.get("refresh_token") + }) + return _obj + + diff --git a/test/auth/models/customize_page_props.py b/test/auth/models/customize_page_props.py new file mode 100644 index 0000000..6c6a6ed --- /dev/null +++ b/test/auth/models/customize_page_props.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class CustomizePageProps(BaseModel): + """ + CustomizePageProps + """ + html_contents: StrictStr = Field(..., description="Edit page HTML ※ This function is not yet provided, so it cannot be changed or saved. ") + is_terms_of_service: StrictBool = Field(..., description="display the terms of use agreement check box") + is_privacy_policy: StrictBool = Field(..., description="show the privacy policy checkbox") + __properties = ["html_contents", "is_terms_of_service", "is_privacy_policy"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePageProps: + """Create an instance of CustomizePageProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePageProps: + """Create an instance of CustomizePageProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePageProps.parse_obj(obj) + + _obj = CustomizePageProps.parse_obj({ + "html_contents": obj.get("html_contents"), + "is_terms_of_service": obj.get("is_terms_of_service"), + "is_privacy_policy": obj.get("is_privacy_policy") + }) + return _obj + + diff --git a/test/auth/models/customize_page_settings.py b/test/auth/models/customize_page_settings.py new file mode 100644 index 0000000..0a239cc --- /dev/null +++ b/test/auth/models/customize_page_settings.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CustomizePageSettings(BaseModel): + """ + CustomizePageSettings + """ + title: StrictStr = Field(..., description="service name") + terms_of_service_url: StrictStr = Field(..., description="terms of service URL") + privacy_policy_url: StrictStr = Field(..., description="privacy policy URL") + google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager container ID") + icon: StrictStr = Field(..., description="service icon") + favicon: StrictStr = Field(..., description="favicon") + __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id", "icon", "favicon"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePageSettings: + """Create an instance of CustomizePageSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePageSettings: + """Create an instance of CustomizePageSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePageSettings.parse_obj(obj) + + _obj = CustomizePageSettings.parse_obj({ + "title": obj.get("title"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "google_tag_manager_container_id": obj.get("google_tag_manager_container_id"), + "icon": obj.get("icon"), + "favicon": obj.get("favicon") + }) + return _obj + + diff --git a/test/auth/models/customize_page_settings_props.py b/test/auth/models/customize_page_settings_props.py new file mode 100644 index 0000000..04c232a --- /dev/null +++ b/test/auth/models/customize_page_settings_props.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CustomizePageSettingsProps(BaseModel): + """ + CustomizePageSettingsProps + """ + title: StrictStr = Field(..., description="service name") + terms_of_service_url: StrictStr = Field(..., description="terms of service URL") + privacy_policy_url: StrictStr = Field(..., description="privacy policy URL") + google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager container ID") + __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePageSettingsProps: + """Create an instance of CustomizePageSettingsProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePageSettingsProps: + """Create an instance of CustomizePageSettingsProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePageSettingsProps.parse_obj(obj) + + _obj = CustomizePageSettingsProps.parse_obj({ + "title": obj.get("title"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "google_tag_manager_container_id": obj.get("google_tag_manager_container_id") + }) + return _obj + + diff --git a/test/auth/models/customize_pages.py b/test/auth/models/customize_pages.py new file mode 100644 index 0000000..09511e9 --- /dev/null +++ b/test/auth/models/customize_pages.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +class CustomizePages(BaseModel): + """ + CustomizePages + """ + sign_up_page: CustomizePageProps = Field(...) + sign_in_page: CustomizePageProps = Field(...) + password_reset_page: CustomizePageProps = Field(...) + __properties = ["sign_up_page", "sign_in_page", "password_reset_page"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CustomizePages: + """Create an instance of CustomizePages from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up_page + if self.sign_up_page: + _dict['sign_up_page'] = self.sign_up_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of sign_in_page + if self.sign_in_page: + _dict['sign_in_page'] = self.sign_in_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of password_reset_page + if self.password_reset_page: + _dict['password_reset_page'] = self.password_reset_page.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CustomizePages: + """Create an instance of CustomizePages from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CustomizePages.parse_obj(obj) + + _obj = CustomizePages.parse_obj({ + "sign_up_page": CustomizePageProps.from_dict(obj.get("sign_up_page")) if obj.get("sign_up_page") is not None else None, + "sign_in_page": CustomizePageProps.from_dict(obj.get("sign_in_page")) if obj.get("sign_in_page") is not None else None, + "password_reset_page": CustomizePageProps.from_dict(obj.get("password_reset_page")) if obj.get("password_reset_page") is not None else None + }) + return _obj + + diff --git a/test/auth/models/device_configuration.py b/test/auth/models/device_configuration.py new file mode 100644 index 0000000..fe1baa7 --- /dev/null +++ b/test/auth/models/device_configuration.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class DeviceConfiguration(BaseModel): + """ + Settings for remembering trusted devices + """ + device_remembering: StrictStr = Field(..., description="always: always remember userOptIn: user opt-in no: don't save ") + __properties = ["device_remembering"] + + @field_validator('device_remembering') + @classmethod + def device_remembering_validate_enum(cls, value): + """Validates the enum""" + if value not in ('always', 'userOptIn', 'no'): + raise ValueError("must be one of enum values ('always', 'userOptIn', 'no')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> DeviceConfiguration: + """Create an instance of DeviceConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DeviceConfiguration: + """Create an instance of DeviceConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DeviceConfiguration.parse_obj(obj) + + _obj = DeviceConfiguration.parse_obj({ + "device_remembering": obj.get("device_remembering") + }) + return _obj + + diff --git a/test/auth/models/dns_record.py b/test/auth/models/dns_record.py new file mode 100644 index 0000000..e9f8d5b --- /dev/null +++ b/test/auth/models/dns_record.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class DnsRecord(BaseModel): + """ + DnsRecord + """ + type: StrictStr = Field(..., description="CNAME Resource Record") + name: StrictStr = Field(..., description="Record Name") + value: StrictStr = Field(..., description="Value") + __properties = ["type", "name", "value"] + + @field_validator('type') + @classmethod + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in ('CNAME'): + raise ValueError("must be one of enum values ('CNAME')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> DnsRecord: + """Create an instance of DnsRecord from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> DnsRecord: + """Create an instance of DnsRecord from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DnsRecord.parse_obj(obj) + + _obj = DnsRecord.parse_obj({ + "type": obj.get("type"), + "name": obj.get("name"), + "value": obj.get("value") + }) + return _obj + + diff --git a/test/auth/models/env.py b/test/auth/models/env.py new file mode 100644 index 0000000..12aff86 --- /dev/null +++ b/test/auth/models/env.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class Env(BaseModel): + """ + env info + """ + id: StrictInt = Field(...) + name: StrictStr = Field(..., description="env name") + display_name: Optional[StrictStr] = Field(None, description="env display name") + __properties = ["id", "name", "display_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Env: + """Create an instance of Env from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Env: + """Create an instance of Env from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Env.parse_obj(obj) + + _obj = Env.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "display_name": obj.get("display_name") + }) + return _obj + + diff --git a/test/auth/models/envs.py b/test/auth/models/envs.py new file mode 100644 index 0000000..b67594f --- /dev/null +++ b/test/auth/models/envs.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.env import Env +from typing_extensions import Annotated + +class Envs(BaseModel): + """ + env list + """ + envs: Annotated[List[Env], Field()] = Field(...) + __properties = ["envs"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Envs: + """Create an instance of Envs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Envs: + """Create an instance of Envs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Envs.parse_obj(obj) + + _obj = Envs.parse_obj({ + "envs": [Env.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None + }) + return _obj + + diff --git a/test/auth/models/error.py b/test/auth/models/error.py new file mode 100644 index 0000000..f8d2a5f --- /dev/null +++ b/test/auth/models/error.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + data: Optional[Dict[str, Any]] = None + __properties = ["type", "message", "data"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message"), + "data": obj.get("data") + }) + return _obj + + diff --git a/test/auth/models/identity_provider_configuration.py b/test/auth/models/identity_provider_configuration.py new file mode 100644 index 0000000..acab1f5 --- /dev/null +++ b/test/auth/models/identity_provider_configuration.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class IdentityProviderConfiguration(BaseModel): + """ + This information is required to set up sign-in using an external identity provider. It cannot be changed. + """ + domain: StrictStr = Field(..., description="domain") + redirect_url: StrictStr = Field(..., description="redirect URL") + entity_id: StrictStr = Field(..., description="entity ID") + reply_url: StrictStr = Field(..., description="reply URL") + __properties = ["domain", "redirect_url", "entity_id", "reply_url"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviderConfiguration: + """Create an instance of IdentityProviderConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviderConfiguration: + """Create an instance of IdentityProviderConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviderConfiguration.parse_obj(obj) + + _obj = IdentityProviderConfiguration.parse_obj({ + "domain": obj.get("domain"), + "redirect_url": obj.get("redirect_url"), + "entity_id": obj.get("entity_id"), + "reply_url": obj.get("reply_url") + }) + return _obj + + diff --git a/test/auth/models/identity_provider_props.py b/test/auth/models/identity_provider_props.py new file mode 100644 index 0000000..2f05670 --- /dev/null +++ b/test/auth/models/identity_provider_props.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class IdentityProviderProps(BaseModel): + """ + IdentityProviderProps + """ + application_id: StrictStr = Field(...) + application_secret: StrictStr = Field(...) + approval_scope: StrictStr = Field(...) + is_button_hidden: Optional[StrictBool] = None + __properties = ["application_id", "application_secret", "approval_scope", "is_button_hidden"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviderProps: + """Create an instance of IdentityProviderProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviderProps: + """Create an instance of IdentityProviderProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviderProps.parse_obj(obj) + + _obj = IdentityProviderProps.parse_obj({ + "application_id": obj.get("application_id"), + "application_secret": obj.get("application_secret"), + "approval_scope": obj.get("approval_scope"), + "is_button_hidden": obj.get("is_button_hidden") + }) + return _obj + + diff --git a/test/auth/models/identity_provider_saml.py b/test/auth/models/identity_provider_saml.py new file mode 100644 index 0000000..bc4972c --- /dev/null +++ b/test/auth/models/identity_provider_saml.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class IdentityProviderSaml(BaseModel): + """ + IdentityProviderSaml + """ + metadata_url: StrictStr = Field(...) + email_attribute: StrictStr = Field(...) + __properties = ["metadata_url", "email_attribute"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviderSaml: + """Create an instance of IdentityProviderSaml from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviderSaml: + """Create an instance of IdentityProviderSaml from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviderSaml.parse_obj(obj) + + _obj = IdentityProviderSaml.parse_obj({ + "metadata_url": obj.get("metadata_url"), + "email_attribute": obj.get("email_attribute") + }) + return _obj + + diff --git a/test/auth/models/identity_providers.py b/test/auth/models/identity_providers.py new file mode 100644 index 0000000..a8377de --- /dev/null +++ b/test/auth/models/identity_providers.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps + +class IdentityProviders(BaseModel): + """ + IdentityProviders + """ + google: IdentityProviderProps = Field(...) + __properties = ["google"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> IdentityProviders: + """Create an instance of IdentityProviders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of google + if self.google: + _dict['google'] = self.google.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> IdentityProviders: + """Create an instance of IdentityProviders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return IdentityProviders.parse_obj(obj) + + _obj = IdentityProviders.parse_obj({ + "google": IdentityProviderProps.from_dict(obj.get("google")) if obj.get("google") is not None else None + }) + return _obj + + diff --git a/test/auth/models/invitation.py b/test/auth/models/invitation.py new file mode 100644 index 0000000..560e69b --- /dev/null +++ b/test/auth/models/invitation.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.invitation_status import InvitationStatus +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from typing_extensions import Annotated + +class Invitation(BaseModel): + """ + Invitation + """ + id: StrictStr = Field(...) + email: StrictStr = Field(..., description="Email address of the invited user") + invitation_url: StrictStr = Field(..., description="Invitation URL") + envs: Annotated[List[UserAvailableEnv], Field()] = Field(...) + expired_at: StrictInt = Field(..., description="Expiration date of the invitation") + status: InvitationStatus = Field(...) + __properties = ["id", "email", "invitation_url", "envs", "expired_at", "status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Invitation: + """Create an instance of Invitation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Invitation: + """Create an instance of Invitation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Invitation.parse_obj(obj) + + _obj = Invitation.parse_obj({ + "id": obj.get("id"), + "email": obj.get("email"), + "invitation_url": obj.get("invitation_url"), + "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None, + "expired_at": obj.get("expired_at"), + "status": obj.get("status") + }) + return _obj + + diff --git a/test/auth/models/invitation_status.py b/test/auth/models/invitation_status.py new file mode 100644 index 0000000..a36483e --- /dev/null +++ b/test/auth/models/invitation_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class InvitationStatus(str, Enum): + """ + InvitationStatus + """ + + """ + allowed enum values + """ + PENDING = 'pending' + ACCEPTED = 'accepted' + EXPIRED = 'expired' + + @classmethod + def from_json(cls, json_str: str) -> InvitationStatus: + """Create an instance of InvitationStatus from a JSON string""" + return InvitationStatus(json.loads(json_str)) + + diff --git a/test/auth/models/invitation_validity.py b/test/auth/models/invitation_validity.py new file mode 100644 index 0000000..23cf1a1 --- /dev/null +++ b/test/auth/models/invitation_validity.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool + +class InvitationValidity(BaseModel): + """ + Invitation validity + """ + is_valid: StrictBool = Field(..., description="Whether the validation is valid or not") + __properties = ["is_valid"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> InvitationValidity: + """Create an instance of InvitationValidity from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> InvitationValidity: + """Create an instance of InvitationValidity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return InvitationValidity.parse_obj(obj) + + _obj = InvitationValidity.parse_obj({ + "is_valid": obj.get("is_valid") + }) + return _obj + + diff --git a/test/auth/models/invitations.py b/test/auth/models/invitations.py new file mode 100644 index 0000000..1bb1104 --- /dev/null +++ b/test/auth/models/invitations.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.invitation import Invitation +from typing_extensions import Annotated + +class Invitations(BaseModel): + """ + Invitations + """ + invitations: Annotated[List[Invitation], Field()] = Field(..., description="Invitation list") + __properties = ["invitations"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Invitations: + """Create an instance of Invitations from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in invitations (list) + _items = [] + if self.invitations: + for _item in self.invitations: + if _item: + _items.append(_item.to_dict()) + _dict['invitations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Invitations: + """Create an instance of Invitations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Invitations.parse_obj(obj) + + _obj = Invitations.parse_obj({ + "invitations": [Invitation.from_dict(_item) for _item in obj.get("invitations")] if obj.get("invitations") is not None else None + }) + return _obj + + diff --git a/test/auth/models/invited_user_environment_information_inner.py b/test/auth/models/invited_user_environment_information_inner.py new file mode 100644 index 0000000..cc75912 --- /dev/null +++ b/test/auth/models/invited_user_environment_information_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from typing_extensions import Annotated + +class InvitedUserEnvironmentInformationInner(BaseModel): + """ + InvitedUserEnvironmentInformationInner + """ + id: StrictInt = Field(...) + role_names: Annotated[List[StrictStr], Field()] = Field(..., description="Role name") + __properties = ["id", "role_names"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> InvitedUserEnvironmentInformationInner: + """Create an instance of InvitedUserEnvironmentInformationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> InvitedUserEnvironmentInformationInner: + """Create an instance of InvitedUserEnvironmentInformationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return InvitedUserEnvironmentInformationInner.parse_obj(obj) + + _obj = InvitedUserEnvironmentInformationInner.parse_obj({ + "id": obj.get("id"), + "role_names": obj.get("role_names") + }) + return _obj + + diff --git a/test/auth/models/invoice_language.py b/test/auth/models/invoice_language.py new file mode 100644 index 0000000..a65ff51 --- /dev/null +++ b/test/auth/models/invoice_language.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class InvoiceLanguage(str, Enum): + """ + Language of invoice + """ + + """ + allowed enum values + """ + JA_MINUS_JP = 'ja-JP' + EN_MINUS_US = 'en-US' + + @classmethod + def from_json(cls, json_str: str) -> InvoiceLanguage: + """Create an instance of InvoiceLanguage from a JSON string""" + return InvoiceLanguage(json.loads(json_str)) + + diff --git a/test/auth/models/link_aws_marketplace_param.py b/test/auth/models/link_aws_marketplace_param.py new file mode 100644 index 0000000..2a39a10 --- /dev/null +++ b/test/auth/models/link_aws_marketplace_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class LinkAwsMarketplaceParam(BaseModel): + """ + LinkAwsMarketplaceParam + """ + tenant_id: StrictStr = Field(..., description="Tenant ID") + access_token: StrictStr = Field(..., description="Access token") + registration_token: StrictStr = Field(..., description="Registration Token") + __properties = ["tenant_id", "access_token", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> LinkAwsMarketplaceParam: + """Create an instance of LinkAwsMarketplaceParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> LinkAwsMarketplaceParam: + """Create an instance of LinkAwsMarketplaceParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LinkAwsMarketplaceParam.parse_obj(obj) + + _obj = LinkAwsMarketplaceParam.parse_obj({ + "tenant_id": obj.get("tenant_id"), + "access_token": obj.get("access_token"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/test/auth/models/message_template.py b/test/auth/models/message_template.py new file mode 100644 index 0000000..7126dec --- /dev/null +++ b/test/auth/models/message_template.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class MessageTemplate(BaseModel): + """ + MessageTemplate + """ + subject: StrictStr = Field(..., description="Title") + message: StrictStr = Field(..., description="Message") + __properties = ["subject", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MessageTemplate: + """Create an instance of MessageTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MessageTemplate: + """Create an instance of MessageTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MessageTemplate.parse_obj(obj) + + _obj = MessageTemplate.parse_obj({ + "subject": obj.get("subject"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/auth/models/mfa_configuration.py b/test/auth/models/mfa_configuration.py new file mode 100644 index 0000000..a483bce --- /dev/null +++ b/test/auth/models/mfa_configuration.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 field_validator, ConfigDict, BaseModel, Field, StrictStr + +class MfaConfiguration(BaseModel): + """ + MFA device authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + """ + mfa_configuration: StrictStr = Field(..., description="on: apply when all users log in optional: apply to individual users with MFA factor enabled ※ The parameter is currently optional and fixed. ") + __properties = ["mfa_configuration"] + + @field_validator('mfa_configuration') + @classmethod + def mfa_configuration_validate_enum(cls, value): + """Validates the enum""" + if value not in ('on', 'optional'): + raise ValueError("must be one of enum values ('on', 'optional')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MfaConfiguration: + """Create an instance of MfaConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MfaConfiguration: + """Create an instance of MfaConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MfaConfiguration.parse_obj(obj) + + _obj = MfaConfiguration.parse_obj({ + "mfa_configuration": obj.get("mfa_configuration") + }) + return _obj + + diff --git a/test/auth/models/mfa_preference.py b/test/auth/models/mfa_preference.py new file mode 100644 index 0000000..aba7c68 --- /dev/null +++ b/test/auth/models/mfa_preference.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import field_validator, ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class MfaPreference(BaseModel): + """ + MfaPreference + """ + enabled: StrictBool = Field(..., description="enable MFA") + method: Optional[StrictStr] = Field(None, description="MFA method (required if enabled is true)") + __properties = ["enabled", "method"] + + @field_validator('method') + @classmethod + def method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in ('softwareToken'): + raise ValueError("must be one of enum values ('softwareToken')") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MfaPreference: + """Create an instance of MfaPreference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MfaPreference: + """Create an instance of MfaPreference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MfaPreference.parse_obj(obj) + + _obj = MfaPreference.parse_obj({ + "enabled": obj.get("enabled"), + "method": obj.get("method") + }) + return _obj + + diff --git a/test/auth/models/notification_messages.py b/test/auth/models/notification_messages.py new file mode 100644 index 0000000..ffd0bd0 --- /dev/null +++ b/test/auth/models/notification_messages.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +class NotificationMessages(BaseModel): + """ + NotificationMessages + """ + sign_up: MessageTemplate = Field(...) + create_user: MessageTemplate = Field(...) + resend_code: MessageTemplate = Field(...) + forgot_password: MessageTemplate = Field(...) + update_user_attribute: MessageTemplate = Field(...) + verify_user_attribute: MessageTemplate = Field(...) + authentication_mfa: MessageTemplate = Field(...) + invite_tenant_user: MessageTemplate = Field(...) + verify_external_user: MessageTemplate = Field(...) + __properties = ["sign_up", "create_user", "resend_code", "forgot_password", "update_user_attribute", "verify_user_attribute", "authentication_mfa", "invite_tenant_user", "verify_external_user"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> NotificationMessages: + """Create an instance of NotificationMessages from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up + if self.sign_up: + _dict['sign_up'] = self.sign_up.to_dict() + # override the default output from pydantic by calling `to_dict()` of create_user + if self.create_user: + _dict['create_user'] = self.create_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of resend_code + if self.resend_code: + _dict['resend_code'] = self.resend_code.to_dict() + # override the default output from pydantic by calling `to_dict()` of forgot_password + if self.forgot_password: + _dict['forgot_password'] = self.forgot_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of update_user_attribute + if self.update_user_attribute: + _dict['update_user_attribute'] = self.update_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_user_attribute + if self.verify_user_attribute: + _dict['verify_user_attribute'] = self.verify_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of authentication_mfa + if self.authentication_mfa: + _dict['authentication_mfa'] = self.authentication_mfa.to_dict() + # override the default output from pydantic by calling `to_dict()` of invite_tenant_user + if self.invite_tenant_user: + _dict['invite_tenant_user'] = self.invite_tenant_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_external_user + if self.verify_external_user: + _dict['verify_external_user'] = self.verify_external_user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> NotificationMessages: + """Create an instance of NotificationMessages from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NotificationMessages.parse_obj(obj) + + _obj = NotificationMessages.parse_obj({ + "sign_up": MessageTemplate.from_dict(obj.get("sign_up")) if obj.get("sign_up") is not None else None, + "create_user": MessageTemplate.from_dict(obj.get("create_user")) if obj.get("create_user") is not None else None, + "resend_code": MessageTemplate.from_dict(obj.get("resend_code")) if obj.get("resend_code") is not None else None, + "forgot_password": MessageTemplate.from_dict(obj.get("forgot_password")) if obj.get("forgot_password") is not None else None, + "update_user_attribute": MessageTemplate.from_dict(obj.get("update_user_attribute")) if obj.get("update_user_attribute") is not None else None, + "verify_user_attribute": MessageTemplate.from_dict(obj.get("verify_user_attribute")) if obj.get("verify_user_attribute") is not None else None, + "authentication_mfa": MessageTemplate.from_dict(obj.get("authentication_mfa")) if obj.get("authentication_mfa") is not None else None, + "invite_tenant_user": MessageTemplate.from_dict(obj.get("invite_tenant_user")) if obj.get("invite_tenant_user") is not None else None, + "verify_external_user": MessageTemplate.from_dict(obj.get("verify_external_user")) if obj.get("verify_external_user") is not None else None + }) + return _obj + + diff --git a/test/auth/models/password_policy.py b/test/auth/models/password_policy.py new file mode 100644 index 0000000..f9cd42a --- /dev/null +++ b/test/auth/models/password_policy.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictInt + +class PasswordPolicy(BaseModel): + """ + Password Policy + """ + minimum_length: StrictInt = Field(..., description="Minimum number of characters") + is_require_lowercase: StrictBool = Field(..., description="Contains one or more lowercase characters") + is_require_numbers: StrictBool = Field(..., description="Contains one or more numeric characters") + is_require_symbols: StrictBool = Field(..., description="Contains one or more special characters") + is_require_uppercase: StrictBool = Field(..., description="Contains one or more uppercase letters") + temporary_password_validity_days: StrictInt = Field(..., description="Temporary password expiration date") + __properties = ["minimum_length", "is_require_lowercase", "is_require_numbers", "is_require_symbols", "is_require_uppercase", "temporary_password_validity_days"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PasswordPolicy: + """Create an instance of PasswordPolicy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PasswordPolicy: + """Create an instance of PasswordPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PasswordPolicy.parse_obj(obj) + + _obj = PasswordPolicy.parse_obj({ + "minimum_length": obj.get("minimum_length"), + "is_require_lowercase": obj.get("is_require_lowercase"), + "is_require_numbers": obj.get("is_require_numbers"), + "is_require_symbols": obj.get("is_require_symbols"), + "is_require_uppercase": obj.get("is_require_uppercase"), + "temporary_password_validity_days": obj.get("temporary_password_validity_days") + }) + return _obj + + diff --git a/test/auth/models/plan_histories.py b/test/auth/models/plan_histories.py new file mode 100644 index 0000000..f1f142c --- /dev/null +++ b/test/auth/models/plan_histories.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from typing_extensions import Annotated + +class PlanHistories(BaseModel): + """ + PlanHistories + """ + plan_histories: Annotated[List[PlanHistory], Field()] = Field(..., description="Plan History") + __properties = ["plan_histories"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PlanHistories: + """Create an instance of PlanHistories from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) + _items = [] + if self.plan_histories: + for _item in self.plan_histories: + if _item: + _items.append(_item.to_dict()) + _dict['plan_histories'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PlanHistories: + """Create an instance of PlanHistories from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PlanHistories.parse_obj(obj) + + _obj = PlanHistories.parse_obj({ + "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None + }) + return _obj + + diff --git a/test/auth/models/plan_history.py b/test/auth/models/plan_history.py new file mode 100644 index 0000000..eb76548 --- /dev/null +++ b/test/auth/models/plan_history.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior + +class PlanHistory(BaseModel): + """ + PlanHistory + """ + plan_id: StrictStr = Field(...) + plan_applied_at: StrictInt = Field(..., description="Registration date") + tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + __properties = ["plan_id", "plan_applied_at", "tax_rate_id", "proration_behavior", "delete_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PlanHistory: + """Create an instance of PlanHistory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PlanHistory: + """Create an instance of PlanHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PlanHistory.parse_obj(obj) + + _obj = PlanHistory.parse_obj({ + "plan_id": obj.get("plan_id"), + "plan_applied_at": obj.get("plan_applied_at"), + "tax_rate_id": obj.get("tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage") + }) + return _obj + + diff --git a/test/auth/models/plan_reservation.py b/test/auth/models/plan_reservation.py new file mode 100644 index 0000000..64118a9 --- /dev/null +++ b/test/auth/models/plan_reservation.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior + +class PlanReservation(BaseModel): + """ + PlanReservation + """ + next_plan_id: Optional[StrictStr] = None + using_next_plan_from: Optional[StrictInt] = Field(None, description="Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) ") + next_plan_tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + __properties = ["next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "proration_behavior", "delete_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PlanReservation: + """Create an instance of PlanReservation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PlanReservation: + """Create an instance of PlanReservation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PlanReservation.parse_obj(obj) + + _obj = PlanReservation.parse_obj({ + "next_plan_id": obj.get("next_plan_id"), + "using_next_plan_from": obj.get("using_next_plan_from"), + "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage") + }) + return _obj + + diff --git a/test/auth/models/proration_behavior.py b/test/auth/models/proration_behavior.py new file mode 100644 index 0000000..f29b5c1 --- /dev/null +++ b/test/auth/models/proration_behavior.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ProrationBehavior(str, Enum): + """ + If you have a strine linkage, you can set the behavior of the proportional allocation when changing plans. When a plan is changed, you can set whether to prorate the billing amount and reflect it on the next invoice, to issue a prorated invoice immediately, or not to prorate at all. + """ + + """ + allowed enum values + """ + CREATE_PRORATIONS = 'create_prorations' + NONE = 'none' + ALWAYS_INVOICE = 'always_invoice' + + @classmethod + def from_json(cls, json_str: str) -> ProrationBehavior: + """Create an instance of ProrationBehavior from a JSON string""" + return ProrationBehavior(json.loads(json_str)) + + diff --git a/test/auth/models/provider_name.py b/test/auth/models/provider_name.py new file mode 100644 index 0000000..ee1eebb --- /dev/null +++ b/test/auth/models/provider_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ProviderName(str, Enum): + """ + ProviderName + """ + + """ + allowed enum values + """ + GOOGLE = 'Google' + + @classmethod + def from_json(cls, json_str: str) -> ProviderName: + """Create an instance of ProviderName from a JSON string""" + return ProviderName(json.loads(json_str)) + + diff --git a/test/auth/models/provider_type.py b/test/auth/models/provider_type.py new file mode 100644 index 0000000..9004fa0 --- /dev/null +++ b/test/auth/models/provider_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ProviderType(str, Enum): + """ + ProviderType + """ + + """ + allowed enum values + """ + SAML = 'SAML' + + @classmethod + def from_json(cls, json_str: str) -> ProviderType: + """Create an instance of ProviderType from a JSON string""" + return ProviderType(json.loads(json_str)) + + diff --git a/test/auth/models/recaptcha_props.py b/test/auth/models/recaptcha_props.py new file mode 100644 index 0000000..6a881e9 --- /dev/null +++ b/test/auth/models/recaptcha_props.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class RecaptchaProps(BaseModel): + """ + reCAPTCHA authentication settings ※ This function is not yet provided, so it cannot be changed or saved. + """ + site_key: StrictStr = Field(..., description="site key") + secret_key: StrictStr = Field(..., description="secret key") + __properties = ["site_key", "secret_key"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> RecaptchaProps: + """Create an instance of RecaptchaProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> RecaptchaProps: + """Create an instance of RecaptchaProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RecaptchaProps.parse_obj(obj) + + _obj = RecaptchaProps.parse_obj({ + "site_key": obj.get("site_key"), + "secret_key": obj.get("secret_key") + }) + return _obj + + diff --git a/test/auth/models/request_email_update_param.py b/test/auth/models/request_email_update_param.py new file mode 100644 index 0000000..6ad6b29 --- /dev/null +++ b/test/auth/models/request_email_update_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class RequestEmailUpdateParam(BaseModel): + """ + RequestEmailUpdateParam + """ + email: StrictStr = Field(..., description="Email Address") + access_token: StrictStr = Field(...) + __properties = ["email", "access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> RequestEmailUpdateParam: + """Create an instance of RequestEmailUpdateParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> RequestEmailUpdateParam: + """Create an instance of RequestEmailUpdateParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RequestEmailUpdateParam.parse_obj(obj) + + _obj = RequestEmailUpdateParam.parse_obj({ + "email": obj.get("email"), + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/test/auth/models/request_external_user_link_param.py b/test/auth/models/request_external_user_link_param.py new file mode 100644 index 0000000..9dadb64 --- /dev/null +++ b/test/auth/models/request_external_user_link_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class RequestExternalUserLinkParam(BaseModel): + """ + RequestExternalUserLinkParam + """ + access_token: StrictStr = Field(...) + __properties = ["access_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> RequestExternalUserLinkParam: + """Create an instance of RequestExternalUserLinkParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> RequestExternalUserLinkParam: + """Create an instance of RequestExternalUserLinkParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RequestExternalUserLinkParam.parse_obj(obj) + + _obj = RequestExternalUserLinkParam.parse_obj({ + "access_token": obj.get("access_token") + }) + return _obj + + diff --git a/test/auth/models/resend_sign_up_confirmation_email_param.py b/test/auth/models/resend_sign_up_confirmation_email_param.py new file mode 100644 index 0000000..d466071 --- /dev/null +++ b/test/auth/models/resend_sign_up_confirmation_email_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class ResendSignUpConfirmationEmailParam(BaseModel): + """ + ResendSignUpConfirmationEmailParam + """ + email: StrictStr = Field(..., description="Email Address") + __properties = ["email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ResendSignUpConfirmationEmailParam: + """Create an instance of ResendSignUpConfirmationEmailParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ResendSignUpConfirmationEmailParam: + """Create an instance of ResendSignUpConfirmationEmailParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ResendSignUpConfirmationEmailParam.parse_obj(obj) + + _obj = ResendSignUpConfirmationEmailParam.parse_obj({ + "email": obj.get("email") + }) + return _obj + + diff --git a/test/auth/models/role.py b/test/auth/models/role.py new file mode 100644 index 0000000..4204371 --- /dev/null +++ b/test/auth/models/role.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Role(BaseModel): + """ + role info + """ + role_name: StrictStr = Field(..., description="role name") + display_name: StrictStr = Field(..., description="role display name") + __properties = ["role_name", "display_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Role: + """Create an instance of Role from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Role: + """Create an instance of Role from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Role.parse_obj(obj) + + _obj = Role.parse_obj({ + "role_name": obj.get("role_name"), + "display_name": obj.get("display_name") + }) + return _obj + + diff --git a/test/auth/models/roles.py b/test/auth/models/roles.py new file mode 100644 index 0000000..7ff104f --- /dev/null +++ b/test/auth/models/roles.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.role import Role +from typing_extensions import Annotated + +class Roles(BaseModel): + """ + Roles + """ + roles: Annotated[List[Role], Field()] = Field(...) + __properties = ["roles"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Roles: + """Create an instance of Roles from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Roles: + """Create an instance of Roles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Roles.parse_obj(obj) + + _obj = Roles.parse_obj({ + "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None + }) + return _obj + + diff --git a/test/auth/models/saas_id.py b/test/auth/models/saas_id.py new file mode 100644 index 0000000..284a42a --- /dev/null +++ b/test/auth/models/saas_id.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class SaasId(BaseModel): + """ + SaasId + """ + tenant_id: StrictStr = Field(...) + env_id: StrictInt = Field(...) + saas_id: StrictStr = Field(..., description="SaaS ID") + __properties = ["tenant_id", "env_id", "saas_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SaasId: + """Create an instance of SaasId from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SaasId: + """Create an instance of SaasId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SaasId.parse_obj(obj) + + _obj = SaasId.parse_obj({ + "tenant_id": obj.get("tenant_id"), + "env_id": obj.get("env_id"), + "saas_id": obj.get("saas_id") + }) + return _obj + + diff --git a/test/auth/models/saas_user.py b/test/auth/models/saas_user.py new file mode 100644 index 0000000..ecc36b7 --- /dev/null +++ b/test/auth/models/saas_user.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class SaasUser(BaseModel): + """ + SaasUser + """ + id: StrictStr = Field(...) + email: StrictStr = Field(..., description="E-mail") + attributes: Dict[str, Any] = Field(..., description="Attribute information ") + __properties = ["id", "email", "attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SaasUser: + """Create an instance of SaasUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SaasUser: + """Create an instance of SaasUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SaasUser.parse_obj(obj) + + _obj = SaasUser.parse_obj({ + "id": obj.get("id"), + "email": obj.get("email"), + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/test/auth/models/saas_users.py b/test/auth/models/saas_users.py new file mode 100644 index 0000000..642c247 --- /dev/null +++ b/test/auth/models/saas_users.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.saas_user import SaasUser +from typing_extensions import Annotated + +class SaasUsers(BaseModel): + """ + SaasUsers + """ + users: Annotated[List[SaasUser], Field()] = Field(...) + __properties = ["users"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SaasUsers: + """Create an instance of SaasUsers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SaasUsers: + """Create an instance of SaasUsers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SaasUsers.parse_obj(obj) + + _obj = SaasUsers.parse_obj({ + "users": [SaasUser.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/test/auth/models/self_regist.py b/test/auth/models/self_regist.py new file mode 100644 index 0000000..3f0efa3 --- /dev/null +++ b/test/auth/models/self_regist.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool + +class SelfRegist(BaseModel): + """ + self sign-up permission + """ + enable: StrictBool = Field(...) + __properties = ["enable"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SelfRegist: + """Create an instance of SelfRegist from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SelfRegist: + """Create an instance of SelfRegist from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SelfRegist.parse_obj(obj) + + _obj = SelfRegist.parse_obj({ + "enable": obj.get("enable") + }) + return _obj + + diff --git a/test/auth/models/sign_in_settings.py b/test/auth/models/sign_in_settings.py new file mode 100644 index 0000000..1467108 --- /dev/null +++ b/test/auth/models/sign_in_settings.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.identity_provider_configuration import IdentityProviderConfiguration +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +class SignInSettings(BaseModel): + """ + SignInSettings + """ + password_policy: PasswordPolicy = Field(...) + device_configuration: DeviceConfiguration = Field(...) + mfa_configuration: MfaConfiguration = Field(...) + recaptcha_props: RecaptchaProps = Field(...) + account_verification: AccountVerification = Field(...) + self_regist: SelfRegist = Field(...) + identity_provider_configuration: IdentityProviderConfiguration = Field(...) + __properties = ["password_policy", "device_configuration", "mfa_configuration", "recaptcha_props", "account_verification", "self_regist", "identity_provider_configuration"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SignInSettings: + """Create an instance of SignInSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of password_policy + if self.password_policy: + _dict['password_policy'] = self.password_policy.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_configuration + if self.device_configuration: + _dict['device_configuration'] = self.device_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfa_configuration + if self.mfa_configuration: + _dict['mfa_configuration'] = self.mfa_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of recaptcha_props + if self.recaptcha_props: + _dict['recaptcha_props'] = self.recaptcha_props.to_dict() + # override the default output from pydantic by calling `to_dict()` of account_verification + if self.account_verification: + _dict['account_verification'] = self.account_verification.to_dict() + # override the default output from pydantic by calling `to_dict()` of self_regist + if self.self_regist: + _dict['self_regist'] = self.self_regist.to_dict() + # override the default output from pydantic by calling `to_dict()` of identity_provider_configuration + if self.identity_provider_configuration: + _dict['identity_provider_configuration'] = self.identity_provider_configuration.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SignInSettings: + """Create an instance of SignInSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SignInSettings.parse_obj(obj) + + _obj = SignInSettings.parse_obj({ + "password_policy": PasswordPolicy.from_dict(obj.get("password_policy")) if obj.get("password_policy") is not None else None, + "device_configuration": DeviceConfiguration.from_dict(obj.get("device_configuration")) if obj.get("device_configuration") is not None else None, + "mfa_configuration": MfaConfiguration.from_dict(obj.get("mfa_configuration")) if obj.get("mfa_configuration") is not None else None, + "recaptcha_props": RecaptchaProps.from_dict(obj.get("recaptcha_props")) if obj.get("recaptcha_props") is not None else None, + "account_verification": AccountVerification.from_dict(obj.get("account_verification")) if obj.get("account_verification") is not None else None, + "self_regist": SelfRegist.from_dict(obj.get("self_regist")) if obj.get("self_regist") is not None else None, + "identity_provider_configuration": IdentityProviderConfiguration.from_dict(obj.get("identity_provider_configuration")) if obj.get("identity_provider_configuration") is not None else None + }) + return _obj + + diff --git a/test/auth/models/sign_up_param.py b/test/auth/models/sign_up_param.py new file mode 100644 index 0000000..4ee144f --- /dev/null +++ b/test/auth/models/sign_up_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SignUpParam(BaseModel): + """ + SignUpParam + """ + email: StrictStr = Field(..., description="Email Address") + __properties = ["email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SignUpParam: + """Create an instance of SignUpParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SignUpParam: + """Create an instance of SignUpParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SignUpParam.parse_obj(obj) + + _obj = SignUpParam.parse_obj({ + "email": obj.get("email") + }) + return _obj + + diff --git a/test/auth/models/sign_up_with_aws_marketplace_param.py b/test/auth/models/sign_up_with_aws_marketplace_param.py new file mode 100644 index 0000000..8a3a043 --- /dev/null +++ b/test/auth/models/sign_up_with_aws_marketplace_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SignUpWithAwsMarketplaceParam(BaseModel): + """ + SignUpWithAwsMarketplaceParam + """ + email: StrictStr = Field(..., description="Email Address") + registration_token: StrictStr = Field(..., description="Registration Token") + __properties = ["email", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SignUpWithAwsMarketplaceParam: + """Create an instance of SignUpWithAwsMarketplaceParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SignUpWithAwsMarketplaceParam: + """Create an instance of SignUpWithAwsMarketplaceParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SignUpWithAwsMarketplaceParam.parse_obj(obj) + + _obj = SignUpWithAwsMarketplaceParam.parse_obj({ + "email": obj.get("email"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/test/auth/models/single_tenant_settings.py b/test/auth/models/single_tenant_settings.py new file mode 100644 index 0000000..55cc6cb --- /dev/null +++ b/test/auth/models/single_tenant_settings.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class SingleTenantSettings(BaseModel): + """ + SingleTenantSettings + """ + enabled: StrictBool = Field(..., description="enable Single Tenant settings or not") + role_arn: StrictStr = Field(..., description="ARN of the role for SaaS Platform to AssumeRole") + cloudformation_template_url: StrictStr = Field(..., description="S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored") + ddl_template_url: StrictStr = Field(..., description="S3 URL where the CloudFormationTemplate to be executed in the SaaS environment is stored") + role_external_id: StrictStr = Field(..., description="External id used by SaaSus when AssumeRole to operate SaaS") + __properties = ["enabled", "role_arn", "cloudformation_template_url", "ddl_template_url", "role_external_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SingleTenantSettings: + """Create an instance of SingleTenantSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SingleTenantSettings: + """Create an instance of SingleTenantSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SingleTenantSettings.parse_obj(obj) + + _obj = SingleTenantSettings.parse_obj({ + "enabled": obj.get("enabled"), + "role_arn": obj.get("role_arn"), + "cloudformation_template_url": obj.get("cloudformation_template_url"), + "ddl_template_url": obj.get("ddl_template_url"), + "role_external_id": obj.get("role_external_id") + }) + return _obj + + diff --git a/test/auth/models/software_token_secret_code.py b/test/auth/models/software_token_secret_code.py new file mode 100644 index 0000000..0098225 --- /dev/null +++ b/test/auth/models/software_token_secret_code.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SoftwareTokenSecretCode(BaseModel): + """ + SoftwareTokenSecretCode + """ + secret_code: StrictStr = Field(..., description="secret code") + __properties = ["secret_code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SoftwareTokenSecretCode: + """Create an instance of SoftwareTokenSecretCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SoftwareTokenSecretCode: + """Create an instance of SoftwareTokenSecretCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SoftwareTokenSecretCode.parse_obj(obj) + + _obj = SoftwareTokenSecretCode.parse_obj({ + "secret_code": obj.get("secret_code") + }) + return _obj + + diff --git a/test/auth/models/stripe_customer.py b/test/auth/models/stripe_customer.py new file mode 100644 index 0000000..85f6f1c --- /dev/null +++ b/test/auth/models/stripe_customer.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class StripeCustomer(BaseModel): + """ + StripeCustomer + """ + customer_id: StrictStr = Field(..., description="stripe Customer ID") + subscription_schedule_id: StrictStr = Field(..., description="stripe Subscription Schedule ID") + __properties = ["customer_id", "subscription_schedule_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StripeCustomer: + """Create an instance of StripeCustomer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StripeCustomer: + """Create an instance of StripeCustomer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StripeCustomer.parse_obj(obj) + + _obj = StripeCustomer.parse_obj({ + "customer_id": obj.get("customer_id"), + "subscription_schedule_id": obj.get("subscription_schedule_id") + }) + return _obj + + diff --git a/test/auth/models/tenant.py b/test/auth/models/tenant.py new file mode 100644 index 0000000..8590aae --- /dev/null +++ b/test/auth/models/tenant.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from typing_extensions import Annotated + +class Tenant(BaseModel): + """ + Tenant + """ + name: StrictStr = Field(..., description="tenant name") + attributes: Dict[str, Any] = Field(..., description="attribute info") + back_office_staff_email: StrictStr = Field(..., description="administrative staff email address") + next_plan_id: Optional[StrictStr] = None + using_next_plan_from: Optional[StrictInt] = Field(None, description="Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) ") + next_plan_tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + plan_histories: Annotated[List[PlanHistory], Field()] = Field(..., description="Plan History") + id: StrictStr = Field(...) + plan_id: Optional[StrictStr] = None + billing_info: Optional[BillingInfo] = None + __properties = ["name", "attributes", "back_office_staff_email", "next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "proration_behavior", "delete_usage", "plan_histories", "id", "plan_id", "billing_info"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Tenant: + """Create an instance of Tenant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) + _items = [] + if self.plan_histories: + for _item in self.plan_histories: + if _item: + _items.append(_item.to_dict()) + _dict['plan_histories'] = _items + # override the default output from pydantic by calling `to_dict()` of billing_info + if self.billing_info: + _dict['billing_info'] = self.billing_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Tenant: + """Create an instance of Tenant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Tenant.parse_obj(obj) + + _obj = Tenant.parse_obj({ + "name": obj.get("name"), + "attributes": obj.get("attributes"), + "back_office_staff_email": obj.get("back_office_staff_email"), + "next_plan_id": obj.get("next_plan_id"), + "using_next_plan_from": obj.get("using_next_plan_from"), + "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage"), + "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None, + "id": obj.get("id"), + "plan_id": obj.get("plan_id"), + "billing_info": BillingInfo.from_dict(obj.get("billing_info")) if obj.get("billing_info") is not None else None + }) + return _obj + + diff --git a/test/auth/models/tenant_attributes.py b/test/auth/models/tenant_attributes.py new file mode 100644 index 0000000..4c0b843 --- /dev/null +++ b/test/auth/models/tenant_attributes.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.attribute import Attribute +from typing_extensions import Annotated + +class TenantAttributes(BaseModel): + """ + TenantAttributes + """ + tenant_attributes: Annotated[List[Attribute], Field()] = Field(..., description="Tenant Attribute Definition") + __properties = ["tenant_attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantAttributes: + """Create an instance of TenantAttributes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tenant_attributes (list) + _items = [] + if self.tenant_attributes: + for _item in self.tenant_attributes: + if _item: + _items.append(_item.to_dict()) + _dict['tenant_attributes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantAttributes: + """Create an instance of TenantAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantAttributes.parse_obj(obj) + + _obj = TenantAttributes.parse_obj({ + "tenant_attributes": [Attribute.from_dict(_item) for _item in obj.get("tenant_attributes")] if obj.get("tenant_attributes") is not None else None + }) + return _obj + + diff --git a/test/auth/models/tenant_detail.py b/test/auth/models/tenant_detail.py new file mode 100644 index 0000000..91b1a0d --- /dev/null +++ b/test/auth/models/tenant_detail.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.billing_info import BillingInfo +from saasus_sdk_python.src.auth.models.plan_history import PlanHistory +from saasus_sdk_python.src.auth.models.proration_behavior import ProrationBehavior +from typing_extensions import Annotated + +class TenantDetail(BaseModel): + """ + TenantDetail + """ + id: StrictStr = Field(...) + plan_id: Optional[StrictStr] = None + billing_info: Optional[BillingInfo] = None + name: StrictStr = Field(..., description="tenant name") + attributes: Dict[str, Any] = Field(..., description="attribute info") + back_office_staff_email: StrictStr = Field(..., description="administrative staff email address") + next_plan_id: Optional[StrictStr] = None + using_next_plan_from: Optional[StrictInt] = Field(None, description="Next billing plan start time (When using stripe, you can create a subscription that starts at the beginning of the current month by specifying 00:00 (UTC) at the beginning of the current month. Ex. 1672531200 for January 2023.) ") + next_plan_tax_rate_id: Optional[StrictStr] = None + proration_behavior: Optional[ProrationBehavior] = None + delete_usage: Optional[StrictBool] = Field(None, description="If you have a stripe linkage, you can set whether to delete pay-as-you-go items when changing plans. When you change plan, you can remove all pay-as-you-go items included in your current subscription to stop being billed based on pay-as-you-go items. The recorded usage is cleared immediately. Since it cannot be restored, please note that plan change reservations with delete_usage set to true cannot be canceled. ") + plan_histories: Annotated[List[PlanHistory], Field()] = Field(..., description="Plan History") + current_plan_period_start: Optional[StrictInt] = Field(None, description="current plan period start") + current_plan_period_end: Optional[StrictInt] = Field(None, description="current plan period end") + __properties = ["id", "plan_id", "billing_info", "name", "attributes", "back_office_staff_email", "next_plan_id", "using_next_plan_from", "next_plan_tax_rate_id", "proration_behavior", "delete_usage", "plan_histories", "current_plan_period_start", "current_plan_period_end"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantDetail: + """Create an instance of TenantDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of billing_info + if self.billing_info: + _dict['billing_info'] = self.billing_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in plan_histories (list) + _items = [] + if self.plan_histories: + for _item in self.plan_histories: + if _item: + _items.append(_item.to_dict()) + _dict['plan_histories'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantDetail: + """Create an instance of TenantDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantDetail.parse_obj(obj) + + _obj = TenantDetail.parse_obj({ + "id": obj.get("id"), + "plan_id": obj.get("plan_id"), + "billing_info": BillingInfo.from_dict(obj.get("billing_info")) if obj.get("billing_info") is not None else None, + "name": obj.get("name"), + "attributes": obj.get("attributes"), + "back_office_staff_email": obj.get("back_office_staff_email"), + "next_plan_id": obj.get("next_plan_id"), + "using_next_plan_from": obj.get("using_next_plan_from"), + "next_plan_tax_rate_id": obj.get("next_plan_tax_rate_id"), + "proration_behavior": obj.get("proration_behavior"), + "delete_usage": obj.get("delete_usage"), + "plan_histories": [PlanHistory.from_dict(_item) for _item in obj.get("plan_histories")] if obj.get("plan_histories") is not None else None, + "current_plan_period_start": obj.get("current_plan_period_start"), + "current_plan_period_end": obj.get("current_plan_period_end") + }) + return _obj + + diff --git a/test/auth/models/tenant_identity_provider_props.py b/test/auth/models/tenant_identity_provider_props.py new file mode 100644 index 0000000..a582593 --- /dev/null +++ b/test/auth/models/tenant_identity_provider_props.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Literal, Any, List, Optional +from pydantic import field_validator, ConfigDict, BaseModel, StrictStr, ValidationError +from saasus_sdk_python.src.auth.models.identity_provider_saml import IdentityProviderSaml +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr + +TENANTIDENTITYPROVIDERPROPS_ONE_OF_SCHEMAS = ["IdentityProviderSaml"] + +class TenantIdentityProviderProps(BaseModel): + """ + TenantIdentityProviderProps + """ + # data type: IdentityProviderSaml + oneof_schema_1_validator: Optional[IdentityProviderSaml] = None + if TYPE_CHECKING: + actual_instance: Union[IdentityProviderSaml] + else: + actual_instance: Any = None + one_of_schemas: Literal[TENANTIDENTITYPROVIDERPROPS_ONE_OF_SCHEMAS] = TENANTIDENTITYPROVIDERPROPS_ONE_OF_SCHEMAS + model_config = ConfigDict(validate_assignment=True) + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + @classmethod + def actual_instance_must_validate_oneof(cls, v): + instance = TenantIdentityProviderProps.construct() + error_messages = [] + match = 0 + # validate data type: IdentityProviderSaml + if not isinstance(v, IdentityProviderSaml): + error_messages.append(f"Error! Input type `{type(v)}` is not `IdentityProviderSaml`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> TenantIdentityProviderProps: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> TenantIdentityProviderProps: + """Returns the object represented by the json string""" + instance = TenantIdentityProviderProps.construct() + error_messages = [] + match = 0 + + # deserialize data into IdentityProviderSaml + try: + instance.actual_instance = IdentityProviderSaml.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into TenantIdentityProviderProps with oneOf schemas: IdentityProviderSaml. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/test/auth/models/tenant_identity_providers.py b/test/auth/models/tenant_identity_providers.py new file mode 100644 index 0000000..d074875 --- /dev/null +++ b/test/auth/models/tenant_identity_providers.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.tenant_identity_providers_saml import TenantIdentityProvidersSaml + +class TenantIdentityProviders(BaseModel): + """ + TenantIdentityProviders + """ + saml: Optional[TenantIdentityProvidersSaml] = None + __properties = ["saml"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantIdentityProviders: + """Create an instance of TenantIdentityProviders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantIdentityProviders: + """Create an instance of TenantIdentityProviders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantIdentityProviders.parse_obj(obj) + + _obj = TenantIdentityProviders.parse_obj({ + "saml": TenantIdentityProvidersSaml.from_dict(obj.get("saml")) if obj.get("saml") is not None else None + }) + return _obj + + diff --git a/test/auth/models/tenant_identity_providers_saml.py b/test/auth/models/tenant_identity_providers_saml.py new file mode 100644 index 0000000..6fac247 --- /dev/null +++ b/test/auth/models/tenant_identity_providers_saml.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class TenantIdentityProvidersSaml(BaseModel): + """ + TenantIdentityProvidersSaml + """ + metadata_url: StrictStr = Field(...) + email_attribute: StrictStr = Field(...) + sign_in_url: StrictStr = Field(...) + __properties = ["metadata_url", "email_attribute", "sign_in_url"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantIdentityProvidersSaml: + """Create an instance of TenantIdentityProvidersSaml from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantIdentityProvidersSaml: + """Create an instance of TenantIdentityProvidersSaml from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantIdentityProvidersSaml.parse_obj(obj) + + _obj = TenantIdentityProvidersSaml.parse_obj({ + "metadata_url": obj.get("metadata_url"), + "email_attribute": obj.get("email_attribute"), + "sign_in_url": obj.get("sign_in_url") + }) + return _obj + + diff --git a/test/auth/models/tenant_props.py b/test/auth/models/tenant_props.py new file mode 100644 index 0000000..540e3ad --- /dev/null +++ b/test/auth/models/tenant_props.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class TenantProps(BaseModel): + """ + TenantProps + """ + name: StrictStr = Field(..., description="tenant name") + attributes: Dict[str, Any] = Field(..., description="attribute info") + back_office_staff_email: StrictStr = Field(..., description="administrative staff email address") + __properties = ["name", "attributes", "back_office_staff_email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TenantProps: + """Create an instance of TenantProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TenantProps: + """Create an instance of TenantProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TenantProps.parse_obj(obj) + + _obj = TenantProps.parse_obj({ + "name": obj.get("name"), + "attributes": obj.get("attributes"), + "back_office_staff_email": obj.get("back_office_staff_email") + }) + return _obj + + diff --git a/test/auth/models/tenants.py b/test/auth/models/tenants.py new file mode 100644 index 0000000..a434f7d --- /dev/null +++ b/test/auth/models/tenants.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.tenant import Tenant +from typing_extensions import Annotated + +class Tenants(BaseModel): + """ + Tenant Info + """ + tenants: Annotated[List[Tenant], Field()] = Field(...) + __properties = ["tenants"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Tenants: + """Create an instance of Tenants from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) + _items = [] + if self.tenants: + for _item in self.tenants: + if _item: + _items.append(_item.to_dict()) + _dict['tenants'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Tenants: + """Create an instance of Tenants from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Tenants.parse_obj(obj) + + _obj = Tenants.parse_obj({ + "tenants": [Tenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None + }) + return _obj + + diff --git a/test/auth/models/update_basic_info_param.py b/test/auth/models/update_basic_info_param.py new file mode 100644 index 0000000..816cdf0 --- /dev/null +++ b/test/auth/models/update_basic_info_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class UpdateBasicInfoParam(BaseModel): + """ + UpdateBasicInfoParam + """ + domain_name: StrictStr = Field(..., description="Domain Name") + from_email_address: StrictStr = Field(..., description="Sender email of authentication email") + reply_email_address: Optional[StrictStr] = Field(None, description="Reply-from email address of authentication email") + __properties = ["domain_name", "from_email_address", "reply_email_address"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateBasicInfoParam: + """Create an instance of UpdateBasicInfoParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateBasicInfoParam: + """Create an instance of UpdateBasicInfoParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateBasicInfoParam.parse_obj(obj) + + _obj = UpdateBasicInfoParam.parse_obj({ + "domain_name": obj.get("domain_name"), + "from_email_address": obj.get("from_email_address"), + "reply_email_address": obj.get("reply_email_address") + }) + return _obj + + diff --git a/test/auth/models/update_customize_page_settings_param.py b/test/auth/models/update_customize_page_settings_param.py new file mode 100644 index 0000000..0452a92 --- /dev/null +++ b/test/auth/models/update_customize_page_settings_param.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateCustomizePageSettingsParam(BaseModel): + """ + UpdateCustomizePageSettingsParam + """ + title: StrictStr = Field(..., description="service name") + terms_of_service_url: StrictStr = Field(..., description="terms of service URL") + privacy_policy_url: StrictStr = Field(..., description="privacy policy URL") + google_tag_manager_container_id: StrictStr = Field(..., description="Google Tag Manager container ID") + icon: StrictStr = Field(..., description="service icon") + favicon: StrictStr = Field(..., description="favicon") + __properties = ["title", "terms_of_service_url", "privacy_policy_url", "google_tag_manager_container_id", "icon", "favicon"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateCustomizePageSettingsParam: + """Create an instance of UpdateCustomizePageSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateCustomizePageSettingsParam: + """Create an instance of UpdateCustomizePageSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateCustomizePageSettingsParam.parse_obj(obj) + + _obj = UpdateCustomizePageSettingsParam.parse_obj({ + "title": obj.get("title"), + "terms_of_service_url": obj.get("terms_of_service_url"), + "privacy_policy_url": obj.get("privacy_policy_url"), + "google_tag_manager_container_id": obj.get("google_tag_manager_container_id"), + "icon": obj.get("icon"), + "favicon": obj.get("favicon") + }) + return _obj + + diff --git a/test/auth/models/update_customize_pages_param.py b/test/auth/models/update_customize_pages_param.py new file mode 100644 index 0000000..867c191 --- /dev/null +++ b/test/auth/models/update_customize_pages_param.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.customize_page_props import CustomizePageProps + +class UpdateCustomizePagesParam(BaseModel): + """ + UpdateCustomizePagesParam + """ + sign_up_page: Optional[CustomizePageProps] = None + sign_in_page: Optional[CustomizePageProps] = None + password_reset_page: Optional[CustomizePageProps] = None + __properties = ["sign_up_page", "sign_in_page", "password_reset_page"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateCustomizePagesParam: + """Create an instance of UpdateCustomizePagesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up_page + if self.sign_up_page: + _dict['sign_up_page'] = self.sign_up_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of sign_in_page + if self.sign_in_page: + _dict['sign_in_page'] = self.sign_in_page.to_dict() + # override the default output from pydantic by calling `to_dict()` of password_reset_page + if self.password_reset_page: + _dict['password_reset_page'] = self.password_reset_page.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateCustomizePagesParam: + """Create an instance of UpdateCustomizePagesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateCustomizePagesParam.parse_obj(obj) + + _obj = UpdateCustomizePagesParam.parse_obj({ + "sign_up_page": CustomizePageProps.from_dict(obj.get("sign_up_page")) if obj.get("sign_up_page") is not None else None, + "sign_in_page": CustomizePageProps.from_dict(obj.get("sign_in_page")) if obj.get("sign_in_page") is not None else None, + "password_reset_page": CustomizePageProps.from_dict(obj.get("password_reset_page")) if obj.get("password_reset_page") is not None else None + }) + return _obj + + diff --git a/test/auth/models/update_env_param.py b/test/auth/models/update_env_param.py new file mode 100644 index 0000000..861ddc7 --- /dev/null +++ b/test/auth/models/update_env_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class UpdateEnvParam(BaseModel): + """ + UpdateEnvParam + """ + name: StrictStr = Field(..., description="env name") + display_name: Optional[StrictStr] = Field(None, description="env display name") + __properties = ["name", "display_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateEnvParam: + """Create an instance of UpdateEnvParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateEnvParam: + """Create an instance of UpdateEnvParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateEnvParam.parse_obj(obj) + + _obj = UpdateEnvParam.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name") + }) + return _obj + + diff --git a/test/auth/models/update_identity_provider_param.py b/test/auth/models/update_identity_provider_param.py new file mode 100644 index 0000000..cf0857f --- /dev/null +++ b/test/auth/models/update_identity_provider_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.identity_provider_props import IdentityProviderProps +from saasus_sdk_python.src.auth.models.provider_name import ProviderName + +class UpdateIdentityProviderParam(BaseModel): + """ + UpdateIdentityProviderParam + """ + provider: ProviderName = Field(...) + identity_provider_props: Optional[IdentityProviderProps] = None + __properties = ["provider", "identity_provider_props"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateIdentityProviderParam: + """Create an instance of UpdateIdentityProviderParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of identity_provider_props + if self.identity_provider_props: + _dict['identity_provider_props'] = self.identity_provider_props.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateIdentityProviderParam: + """Create an instance of UpdateIdentityProviderParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateIdentityProviderParam.parse_obj(obj) + + _obj = UpdateIdentityProviderParam.parse_obj({ + "provider": obj.get("provider"), + "identity_provider_props": IdentityProviderProps.from_dict(obj.get("identity_provider_props")) if obj.get("identity_provider_props") is not None else None + }) + return _obj + + diff --git a/test/auth/models/update_notification_messages_param.py b/test/auth/models/update_notification_messages_param.py new file mode 100644 index 0000000..32d3a4d --- /dev/null +++ b/test/auth/models/update_notification_messages_param.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.message_template import MessageTemplate + +class UpdateNotificationMessagesParam(BaseModel): + """ + UpdateNotificationMessagesParam + """ + sign_up: Optional[MessageTemplate] = None + create_user: Optional[MessageTemplate] = None + resend_code: Optional[MessageTemplate] = None + forgot_password: Optional[MessageTemplate] = None + update_user_attribute: Optional[MessageTemplate] = None + verify_user_attribute: Optional[MessageTemplate] = None + authentication_mfa: Optional[MessageTemplate] = None + invite_tenant_user: Optional[MessageTemplate] = None + verify_external_user: Optional[MessageTemplate] = None + __properties = ["sign_up", "create_user", "resend_code", "forgot_password", "update_user_attribute", "verify_user_attribute", "authentication_mfa", "invite_tenant_user", "verify_external_user"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateNotificationMessagesParam: + """Create an instance of UpdateNotificationMessagesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of sign_up + if self.sign_up: + _dict['sign_up'] = self.sign_up.to_dict() + # override the default output from pydantic by calling `to_dict()` of create_user + if self.create_user: + _dict['create_user'] = self.create_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of resend_code + if self.resend_code: + _dict['resend_code'] = self.resend_code.to_dict() + # override the default output from pydantic by calling `to_dict()` of forgot_password + if self.forgot_password: + _dict['forgot_password'] = self.forgot_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of update_user_attribute + if self.update_user_attribute: + _dict['update_user_attribute'] = self.update_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_user_attribute + if self.verify_user_attribute: + _dict['verify_user_attribute'] = self.verify_user_attribute.to_dict() + # override the default output from pydantic by calling `to_dict()` of authentication_mfa + if self.authentication_mfa: + _dict['authentication_mfa'] = self.authentication_mfa.to_dict() + # override the default output from pydantic by calling `to_dict()` of invite_tenant_user + if self.invite_tenant_user: + _dict['invite_tenant_user'] = self.invite_tenant_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of verify_external_user + if self.verify_external_user: + _dict['verify_external_user'] = self.verify_external_user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateNotificationMessagesParam: + """Create an instance of UpdateNotificationMessagesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateNotificationMessagesParam.parse_obj(obj) + + _obj = UpdateNotificationMessagesParam.parse_obj({ + "sign_up": MessageTemplate.from_dict(obj.get("sign_up")) if obj.get("sign_up") is not None else None, + "create_user": MessageTemplate.from_dict(obj.get("create_user")) if obj.get("create_user") is not None else None, + "resend_code": MessageTemplate.from_dict(obj.get("resend_code")) if obj.get("resend_code") is not None else None, + "forgot_password": MessageTemplate.from_dict(obj.get("forgot_password")) if obj.get("forgot_password") is not None else None, + "update_user_attribute": MessageTemplate.from_dict(obj.get("update_user_attribute")) if obj.get("update_user_attribute") is not None else None, + "verify_user_attribute": MessageTemplate.from_dict(obj.get("verify_user_attribute")) if obj.get("verify_user_attribute") is not None else None, + "authentication_mfa": MessageTemplate.from_dict(obj.get("authentication_mfa")) if obj.get("authentication_mfa") is not None else None, + "invite_tenant_user": MessageTemplate.from_dict(obj.get("invite_tenant_user")) if obj.get("invite_tenant_user") is not None else None, + "verify_external_user": MessageTemplate.from_dict(obj.get("verify_external_user")) if obj.get("verify_external_user") is not None else None + }) + return _obj + + diff --git a/test/auth/models/update_saas_user_attributes_param.py b/test/auth/models/update_saas_user_attributes_param.py new file mode 100644 index 0000000..ddc9690 --- /dev/null +++ b/test/auth/models/update_saas_user_attributes_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field + +class UpdateSaasUserAttributesParam(BaseModel): + """ + UpdateSaasUserAttributesParam + """ + attributes: Dict[str, Any] = Field(..., description="Attribute information ") + __properties = ["attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSaasUserAttributesParam: + """Create an instance of UpdateSaasUserAttributesParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSaasUserAttributesParam: + """Create an instance of UpdateSaasUserAttributesParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSaasUserAttributesParam.parse_obj(obj) + + _obj = UpdateSaasUserAttributesParam.parse_obj({ + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/test/auth/models/update_saas_user_email_param.py b/test/auth/models/update_saas_user_email_param.py new file mode 100644 index 0000000..346bf57 --- /dev/null +++ b/test/auth/models/update_saas_user_email_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateSaasUserEmailParam(BaseModel): + """ + UpdateSaasUserEmailParam + """ + email: StrictStr = Field(..., description="E-mail") + __properties = ["email"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSaasUserEmailParam: + """Create an instance of UpdateSaasUserEmailParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSaasUserEmailParam: + """Create an instance of UpdateSaasUserEmailParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSaasUserEmailParam.parse_obj(obj) + + _obj = UpdateSaasUserEmailParam.parse_obj({ + "email": obj.get("email") + }) + return _obj + + diff --git a/test/auth/models/update_saas_user_password_param.py b/test/auth/models/update_saas_user_password_param.py new file mode 100644 index 0000000..cb17e5a --- /dev/null +++ b/test/auth/models/update_saas_user_password_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateSaasUserPasswordParam(BaseModel): + """ + UpdateSaasUserPasswordParam + """ + password: StrictStr = Field(..., description="Password") + __properties = ["password"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSaasUserPasswordParam: + """Create an instance of UpdateSaasUserPasswordParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSaasUserPasswordParam: + """Create an instance of UpdateSaasUserPasswordParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSaasUserPasswordParam.parse_obj(obj) + + _obj = UpdateSaasUserPasswordParam.parse_obj({ + "password": obj.get("password") + }) + return _obj + + diff --git a/test/auth/models/update_sign_in_settings_param.py b/test/auth/models/update_sign_in_settings_param.py new file mode 100644 index 0000000..5b96a41 --- /dev/null +++ b/test/auth/models/update_sign_in_settings_param.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel +from saasus_sdk_python.src.auth.models.account_verification import AccountVerification +from saasus_sdk_python.src.auth.models.device_configuration import DeviceConfiguration +from saasus_sdk_python.src.auth.models.mfa_configuration import MfaConfiguration +from saasus_sdk_python.src.auth.models.password_policy import PasswordPolicy +from saasus_sdk_python.src.auth.models.recaptcha_props import RecaptchaProps +from saasus_sdk_python.src.auth.models.self_regist import SelfRegist + +class UpdateSignInSettingsParam(BaseModel): + """ + UpdateSignInSettingsParam + """ + password_policy: Optional[PasswordPolicy] = None + device_configuration: Optional[DeviceConfiguration] = None + mfa_configuration: Optional[MfaConfiguration] = None + recaptcha_props: Optional[RecaptchaProps] = None + account_verification: Optional[AccountVerification] = None + self_regist: Optional[SelfRegist] = None + __properties = ["password_policy", "device_configuration", "mfa_configuration", "recaptcha_props", "account_verification", "self_regist"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSignInSettingsParam: + """Create an instance of UpdateSignInSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of password_policy + if self.password_policy: + _dict['password_policy'] = self.password_policy.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_configuration + if self.device_configuration: + _dict['device_configuration'] = self.device_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of mfa_configuration + if self.mfa_configuration: + _dict['mfa_configuration'] = self.mfa_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of recaptcha_props + if self.recaptcha_props: + _dict['recaptcha_props'] = self.recaptcha_props.to_dict() + # override the default output from pydantic by calling `to_dict()` of account_verification + if self.account_verification: + _dict['account_verification'] = self.account_verification.to_dict() + # override the default output from pydantic by calling `to_dict()` of self_regist + if self.self_regist: + _dict['self_regist'] = self.self_regist.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSignInSettingsParam: + """Create an instance of UpdateSignInSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSignInSettingsParam.parse_obj(obj) + + _obj = UpdateSignInSettingsParam.parse_obj({ + "password_policy": PasswordPolicy.from_dict(obj.get("password_policy")) if obj.get("password_policy") is not None else None, + "device_configuration": DeviceConfiguration.from_dict(obj.get("device_configuration")) if obj.get("device_configuration") is not None else None, + "mfa_configuration": MfaConfiguration.from_dict(obj.get("mfa_configuration")) if obj.get("mfa_configuration") is not None else None, + "recaptcha_props": RecaptchaProps.from_dict(obj.get("recaptcha_props")) if obj.get("recaptcha_props") is not None else None, + "account_verification": AccountVerification.from_dict(obj.get("account_verification")) if obj.get("account_verification") is not None else None, + "self_regist": SelfRegist.from_dict(obj.get("self_regist")) if obj.get("self_regist") is not None else None + }) + return _obj + + diff --git a/test/auth/models/update_single_tenant_settings_param.py b/test/auth/models/update_single_tenant_settings_param.py new file mode 100644 index 0000000..c43850b --- /dev/null +++ b/test/auth/models/update_single_tenant_settings_param.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr + +class UpdateSingleTenantSettingsParam(BaseModel): + """ + UpdateSingleTenantSettingsParam + """ + enabled: Optional[StrictBool] = Field(None, description="enable Single Tenant settings or not") + role_arn: Optional[StrictStr] = Field(None, description="ARN of the role for SaaS Platform to AssumeRole") + cloudformation_template: Optional[StrictStr] = Field(None, description="CloudFormation template file") + ddl_template: Optional[StrictStr] = Field(None, description="ddl file to run in SaaS environment") + role_external_id: Optional[StrictStr] = Field(None, description="External id used by SaaSus when AssumeRole to operate SaaS") + __properties = ["enabled", "role_arn", "cloudformation_template", "ddl_template", "role_external_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSingleTenantSettingsParam: + """Create an instance of UpdateSingleTenantSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSingleTenantSettingsParam: + """Create an instance of UpdateSingleTenantSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSingleTenantSettingsParam.parse_obj(obj) + + _obj = UpdateSingleTenantSettingsParam.parse_obj({ + "enabled": obj.get("enabled"), + "role_arn": obj.get("role_arn"), + "cloudformation_template": obj.get("cloudformation_template"), + "ddl_template": obj.get("ddl_template"), + "role_external_id": obj.get("role_external_id") + }) + return _obj + + diff --git a/test/auth/models/update_software_token_param.py b/test/auth/models/update_software_token_param.py new file mode 100644 index 0000000..f699113 --- /dev/null +++ b/test/auth/models/update_software_token_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateSoftwareTokenParam(BaseModel): + """ + UpdateSoftwareTokenParam + """ + access_token: StrictStr = Field(..., description="access token") + verification_code: StrictStr = Field(..., description="verification code") + __properties = ["access_token", "verification_code"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSoftwareTokenParam: + """Create an instance of UpdateSoftwareTokenParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSoftwareTokenParam: + """Create an instance of UpdateSoftwareTokenParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSoftwareTokenParam.parse_obj(obj) + + _obj = UpdateSoftwareTokenParam.parse_obj({ + "access_token": obj.get("access_token"), + "verification_code": obj.get("verification_code") + }) + return _obj + + diff --git a/test/auth/models/update_tenant_identity_provider_param.py b/test/auth/models/update_tenant_identity_provider_param.py new file mode 100644 index 0000000..e6d624f --- /dev/null +++ b/test/auth/models/update_tenant_identity_provider_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.provider_type import ProviderType +from saasus_sdk_python.src.auth.models.tenant_identity_provider_props import TenantIdentityProviderProps + +class UpdateTenantIdentityProviderParam(BaseModel): + """ + If identity_provider_props is null, the sign-in information for the external identity provider specified in provider_type is disabled. + """ + provider_type: ProviderType = Field(...) + identity_provider_props: Optional[TenantIdentityProviderProps] = None + __properties = ["provider_type", "identity_provider_props"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateTenantIdentityProviderParam: + """Create an instance of UpdateTenantIdentityProviderParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of identity_provider_props + if self.identity_provider_props: + _dict['identity_provider_props'] = self.identity_provider_props.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateTenantIdentityProviderParam: + """Create an instance of UpdateTenantIdentityProviderParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateTenantIdentityProviderParam.parse_obj(obj) + + _obj = UpdateTenantIdentityProviderParam.parse_obj({ + "provider_type": obj.get("provider_type"), + "identity_provider_props": TenantIdentityProviderProps.from_dict(obj.get("identity_provider_props")) if obj.get("identity_provider_props") is not None else None + }) + return _obj + + diff --git a/test/auth/models/update_tenant_user_param.py b/test/auth/models/update_tenant_user_param.py new file mode 100644 index 0000000..7864b5d --- /dev/null +++ b/test/auth/models/update_tenant_user_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict +from pydantic import ConfigDict, BaseModel, Field + +class UpdateTenantUserParam(BaseModel): + """ + UpdateTenantUserParam + """ + attributes: Dict[str, Any] = Field(..., description="Attribute information (Get information set by defining user attributes in the SaaS development console) ") + __properties = ["attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateTenantUserParam: + """Create an instance of UpdateTenantUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateTenantUserParam: + """Create an instance of UpdateTenantUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateTenantUserParam.parse_obj(obj) + + _obj = UpdateTenantUserParam.parse_obj({ + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/test/auth/models/user.py b/test/auth/models/user.py new file mode 100644 index 0000000..28576a8 --- /dev/null +++ b/test/auth/models/user.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from typing_extensions import Annotated + +class User(BaseModel): + """ + User + """ + id: StrictStr = Field(..., description="User ID") + tenant_id: StrictStr = Field(...) + tenant_name: StrictStr = Field(..., description="Tenant Name") + email: StrictStr = Field(..., description="E-mail") + attributes: Dict[str, Any] = Field(..., description="Attribute information (Get information set by defining user attributes in the SaaS development console) ") + envs: Annotated[List[UserAvailableEnv], Field()] = Field(...) + __properties = ["id", "tenant_id", "tenant_name", "email", "attributes", "envs"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> User: + """Create an instance of User from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> User: + """Create an instance of User from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return User.parse_obj(obj) + + _obj = User.parse_obj({ + "id": obj.get("id"), + "tenant_id": obj.get("tenant_id"), + "tenant_name": obj.get("tenant_name"), + "email": obj.get("email"), + "attributes": obj.get("attributes"), + "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None + }) + return _obj + + diff --git a/test/auth/models/user_attributes.py b/test/auth/models/user_attributes.py new file mode 100644 index 0000000..d24c2ec --- /dev/null +++ b/test/auth/models/user_attributes.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.attribute import Attribute +from typing_extensions import Annotated + +class UserAttributes(BaseModel): + """ + UserAttributes + """ + user_attributes: Annotated[List[Attribute], Field()] = Field(..., description="User Attribute Definition") + __properties = ["user_attributes"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserAttributes: + """Create an instance of UserAttributes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in user_attributes (list) + _items = [] + if self.user_attributes: + for _item in self.user_attributes: + if _item: + _items.append(_item.to_dict()) + _dict['user_attributes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAttributes: + """Create an instance of UserAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserAttributes.parse_obj(obj) + + _obj = UserAttributes.parse_obj({ + "user_attributes": [Attribute.from_dict(_item) for _item in obj.get("user_attributes")] if obj.get("user_attributes") is not None else None + }) + return _obj + + diff --git a/test/auth/models/user_available_env.py b/test/auth/models/user_available_env.py new file mode 100644 index 0000000..04cc076 --- /dev/null +++ b/test/auth/models/user_available_env.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.auth.models.role import Role +from typing_extensions import Annotated + +class UserAvailableEnv(BaseModel): + """ + UserAvailableEnv + """ + id: StrictInt = Field(...) + name: StrictStr = Field(..., description="env name") + display_name: Optional[StrictStr] = Field(None, description="env display name") + roles: Annotated[List[Role], Field()] = Field(..., description="role info") + __properties = ["id", "name", "display_name", "roles"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserAvailableEnv: + """Create an instance of UserAvailableEnv from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAvailableEnv: + """Create an instance of UserAvailableEnv from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserAvailableEnv.parse_obj(obj) + + _obj = UserAvailableEnv.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None + }) + return _obj + + diff --git a/test/auth/models/user_available_tenant.py b/test/auth/models/user_available_tenant.py new file mode 100644 index 0000000..8ab5e3d --- /dev/null +++ b/test/auth/models/user_available_tenant.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.auth.models.user_available_env import UserAvailableEnv +from typing_extensions import Annotated + +class UserAvailableTenant(BaseModel): + """ + UserAvailableTenant + """ + id: StrictStr = Field(...) + name: StrictStr = Field(..., description="Tenant Name") + completed_sign_up: StrictBool = Field(...) + envs: Annotated[List[UserAvailableEnv], Field()] = Field(..., description="environmental info, role info") + user_attribute: Dict[str, Any] = Field(..., description="user additional attributes") + back_office_staff_email: StrictStr = Field(..., description="back office contact email") + plan_id: Optional[StrictStr] = None + is_paid: Optional[StrictBool] = Field(None, description="tenant payment status ※ Currently, it is returned only when stripe is linked. ") + __properties = ["id", "name", "completed_sign_up", "envs", "user_attribute", "back_office_staff_email", "plan_id", "is_paid"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserAvailableTenant: + """Create an instance of UserAvailableTenant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in envs (list) + _items = [] + if self.envs: + for _item in self.envs: + if _item: + _items.append(_item.to_dict()) + _dict['envs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserAvailableTenant: + """Create an instance of UserAvailableTenant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserAvailableTenant.parse_obj(obj) + + _obj = UserAvailableTenant.parse_obj({ + "id": obj.get("id"), + "name": obj.get("name"), + "completed_sign_up": obj.get("completed_sign_up"), + "envs": [UserAvailableEnv.from_dict(_item) for _item in obj.get("envs")] if obj.get("envs") is not None else None, + "user_attribute": obj.get("user_attribute"), + "back_office_staff_email": obj.get("back_office_staff_email"), + "plan_id": obj.get("plan_id"), + "is_paid": obj.get("is_paid") + }) + return _obj + + diff --git a/test/auth/models/user_info.py b/test/auth/models/user_info.py new file mode 100644 index 0000000..4b8bf36 --- /dev/null +++ b/test/auth/models/user_info.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Any, Dict, List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.auth.models.user_available_tenant import UserAvailableTenant +from typing_extensions import Annotated + +class UserInfo(BaseModel): + """ + UserInfo + """ + id: StrictStr = Field(...) + email: StrictStr = Field(..., description="E-mail") + user_attribute: Dict[str, Any] = Field(..., description="user additional attributes") + tenants: Annotated[List[UserAvailableTenant], Field()] = Field(..., description="Tenant Info") + __properties = ["id", "email", "user_attribute", "tenants"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UserInfo: + """Create an instance of UserInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) + _items = [] + if self.tenants: + for _item in self.tenants: + if _item: + _items.append(_item.to_dict()) + _dict['tenants'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UserInfo: + """Create an instance of UserInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UserInfo.parse_obj(obj) + + _obj = UserInfo.parse_obj({ + "id": obj.get("id"), + "email": obj.get("email"), + "user_attribute": obj.get("user_attribute"), + "tenants": [UserAvailableTenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None + }) + return _obj + + diff --git a/test/auth/models/users.py b/test/auth/models/users.py new file mode 100644 index 0000000..f8c5772 --- /dev/null +++ b/test/auth/models/users.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.auth.models.user import User +from typing_extensions import Annotated + +class Users(BaseModel): + """ + Users + """ + users: Annotated[List[User], Field()] = Field(...) + __properties = ["users"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Users: + """Create an instance of Users from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Users: + """Create an instance of Users from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Users.parse_obj(obj) + + _obj = Users.parse_obj({ + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/test/auth/models/validate_invitation_param.py b/test/auth/models/validate_invitation_param.py new file mode 100644 index 0000000..7bce826 --- /dev/null +++ b/test/auth/models/validate_invitation_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class ValidateInvitationParam(BaseModel): + """ + Access token is required for existing users, and email and password is required for new users. + """ + access_token: Optional[StrictStr] = Field(None, description="Access token of the invited user") + email: Optional[StrictStr] = Field(None, description="Email address of the invited user") + password: Optional[StrictStr] = Field(None, description="Password of the invited user") + __properties = ["access_token", "email", "password"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> ValidateInvitationParam: + """Create an instance of ValidateInvitationParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ValidateInvitationParam: + """Create an instance of ValidateInvitationParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ValidateInvitationParam.parse_obj(obj) + + _obj = ValidateInvitationParam.parse_obj({ + "access_token": obj.get("access_token"), + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/test/auth/py.typed b/test/auth/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/auth/rest.py b/test/auth/rest.py new file mode 100644 index 0000000..5015f7c --- /dev/null +++ b/test/auth/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.auth.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/test/awsmarketplace/__init__.py b/test/awsmarketplace/__init__.py new file mode 100644 index 0000000..818cc05 --- /dev/null +++ b/test/awsmarketplace/__init__.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.awsmarketplace.api.aws_marketplace_api import AwsMarketplaceApi +from saasus_sdk_python.src.awsmarketplace.api.error_api import ErrorApi + +# import ApiClient +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient +from saasus_sdk_python.src.awsmarketplace.configuration import Configuration +from saasus_sdk_python.src.awsmarketplace.exceptions import OpenApiException +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiTypeError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiValueError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiKeyError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiAttributeError +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.models.error import Error +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.models.visibility_status import VisibilityStatus diff --git a/test/awsmarketplace/api/__init__.py b/test/awsmarketplace/api/__init__.py new file mode 100644 index 0000000..81fb350 --- /dev/null +++ b/test/awsmarketplace/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.awsmarketplace.api.aws_marketplace_api import AwsMarketplaceApi +from saasus_sdk_python.src.awsmarketplace.api.error_api import ErrorApi + diff --git a/test/awsmarketplace/api/aws_marketplace_api.py b/test/awsmarketplace/api/aws_marketplace_api.py new file mode 100644 index 0000000..51e491e --- /dev/null +++ b/test/awsmarketplace/api/aws_marketplace_api.py @@ -0,0 +1,1999 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import List, Optional + +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam + +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +from saasus_sdk_python.src.awsmarketplace.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AwsMarketplaceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_customer(self, create_customer_param : Optional[CreateCustomerParam] = None, **kwargs) -> Customer: # noqa: E501 + """Create customer information to be linked to AWS Marketplace # noqa: E501 + + Create customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_customer(create_customer_param, async_req=True) + >>> result = thread.get() + + :param create_customer_param: + :type create_customer_param: CreateCustomerParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Customer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_customer_with_http_info(create_customer_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_customer_with_http_info(self, create_customer_param : Optional[CreateCustomerParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create customer information to be linked to AWS Marketplace # noqa: E501 + + Create customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_customer_with_http_info(create_customer_param, async_req=True) + >>> result = thread.get() + + :param create_customer_param: + :type create_customer_param: CreateCustomerParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Customer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'create_customer_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_customer_param'] is not None: + _body_params = _params['create_customer_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Customer", + '500': "Error", + } + + return self.api_client.call_api( + '/customers', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_catalog_entity_visibility(self, **kwargs) -> CatalogEntityVisibility: # noqa: E501 + """Obtain product publication status from AWS Marketplace # noqa: E501 + + Retrieve the product's publication status from AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_catalog_entity_visibility(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CatalogEntityVisibility + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_catalog_entity_visibility_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_catalog_entity_visibility_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_catalog_entity_visibility_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Obtain product publication status from AWS Marketplace # noqa: E501 + + Retrieve the product's publication status from AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_catalog_entity_visibility_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CatalogEntityVisibility, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_catalog_entity_visibility" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CatalogEntityVisibility", + '500': "Error", + } + + return self.api_client.call_api( + '/catalog-entity/visibility', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_cloud_formation_launch_stack_link(self, **kwargs) -> CloudFormationLaunchStackLink: # noqa: E501 + """Get the link to create the AWS CloudFormation stack # noqa: E501 + + Get the CloudFormation Quick Create link. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CloudFormationLaunchStackLink + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_cloud_formation_launch_stack_link_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_cloud_formation_launch_stack_link_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_cloud_formation_launch_stack_link_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get the link to create the AWS CloudFormation stack # noqa: E501 + + Get the CloudFormation Quick Create link. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_cloud_formation_launch_stack_link_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CloudFormationLaunchStackLink, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_cloud_formation_launch_stack_link" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "CloudFormationLaunchStackLink", + '500': "Error", + } + + return self.api_client.call_api( + '/cloudformation-launch-stack-link', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customer(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> Customer: # noqa: E501 + """Get customer information to be linked to AWS Marketplace # noqa: E501 + + Get customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customer(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Customer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customer_with_http_info(customer_identifier, **kwargs) # noqa: E501 + + @validate_arguments + def get_customer_with_http_info(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get customer information to be linked to AWS Marketplace # noqa: E501 + + Get customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customer_with_http_info(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Customer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'customer_identifier' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['customer_identifier']: + _path_params['customer_identifier'] = _params['customer_identifier'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Customer", + '500': "Error", + } + + return self.api_client.call_api( + '/customers/{customer_identifier}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_customers(self, tenant_ids : Annotated[Optional[Annotated[List[StrictStr], Field()]], Field(description="指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID)")] = None, **kwargs) -> Customers: # noqa: E501 + """Get a list of customer information to be linked to AWS Marketplace # noqa: E501 + + Get a list of customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customers(tenant_ids, async_req=True) + >>> result = thread.get() + + :param tenant_ids: 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) + :type tenant_ids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Customers + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_customers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_customers_with_http_info(tenant_ids, **kwargs) # noqa: E501 + + @validate_arguments + def get_customers_with_http_info(self, tenant_ids : Annotated[Optional[Annotated[List[StrictStr], Field()]], Field(description="指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID)")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get a list of customer information to be linked to AWS Marketplace # noqa: E501 + + Get a list of customer information to be linked to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_customers_with_http_info(tenant_ids, async_req=True) + >>> result = thread.get() + + :param tenant_ids: 指定したテナントIDの顧客を取得する(Get customers with the specified tenant ID) + :type tenant_ids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Customers, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_ids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customers" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('tenant_ids') is not None: # noqa: E501 + _query_params.append(('tenant_ids', _params['tenant_ids'])) + _collection_formats['tenant_ids'] = 'multi' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Customers", + '500': "Error", + } + + return self.api_client.call_api( + '/customers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_listing_status(self, **kwargs) -> GetListingStatusResult: # noqa: E501 + """Get AWS Marketplace Listing Status # noqa: E501 + + Get AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_listing_status(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: GetListingStatusResult + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_listing_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_listing_status_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_listing_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get AWS Marketplace Listing Status # noqa: E501 + + Get AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_listing_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(GetListingStatusResult, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_listing_status" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "GetListingStatusResult", + '500': "Error", + } + + return self.api_client.call_api( + '/listing-status', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_plan_by_plan_name(self, plan_name : Annotated[StrictStr, Field(..., description="AWS Marketplace linked plan name")], **kwargs) -> Plan: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plan_by_plan_name(plan_name, async_req=True) + >>> result = thread.get() + + :param plan_name: AWS Marketplace linked plan name (required) + :type plan_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Plan + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_plan_by_plan_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_plan_by_plan_name_with_http_info(plan_name, **kwargs) # noqa: E501 + + @validate_arguments + def get_plan_by_plan_name_with_http_info(self, plan_name : Annotated[StrictStr, Field(..., description="AWS Marketplace linked plan name")], **kwargs) -> ApiResponse: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plan_by_plan_name_with_http_info(plan_name, async_req=True) + >>> result = thread.get() + + :param plan_name: AWS Marketplace linked plan name (required) + :type plan_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Plan, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'plan_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_plan_by_plan_name" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_name']: + _path_params['plan_name'] = _params['plan_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Plan", + '500': "Error", + } + + return self.api_client.call_api( + '/plans/{plan_name}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_plans(self, **kwargs) -> Plans: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plans(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Plans + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_plans_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_plans_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_plans_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Obtain plan information to link to AWS Marketplace # noqa: E501 + + Obtain plan information to link to AWS Marketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Plans, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_plans" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Plans", + '500': "Error", + } + + return self.api_client.call_api( + '/plans', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_settings(self, **kwargs) -> Settings: # noqa: E501 + """Get AWS Marketplace Settings # noqa: E501 + + Get AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Settings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get AWS Marketplace Settings # noqa: E501 + + Get AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Settings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Settings", + '500': "Error", + } + + return self.api_client.call_api( + '/settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def save_plan(self, save_plan_param : Optional[SavePlanParam] = None, **kwargs) -> None: # noqa: E501 + """Save plan information to be linked to AWSMarketplace # noqa: E501 + + Save plan information to be linked to AWSMarketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_plan(save_plan_param, async_req=True) + >>> result = thread.get() + + :param save_plan_param: + :type save_plan_param: SavePlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the save_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.save_plan_with_http_info(save_plan_param, **kwargs) # noqa: E501 + + @validate_arguments + def save_plan_with_http_info(self, save_plan_param : Optional[SavePlanParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Save plan information to be linked to AWSMarketplace # noqa: E501 + + Save plan information to be linked to AWSMarketplace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_plan_with_http_info(save_plan_param, async_req=True) + >>> result = thread.get() + + :param save_plan_param: + :type save_plan_param: SavePlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'save_plan_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method save_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['save_plan_param'] is not None: + _body_params = _params['save_plan_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def sync_customer(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> None: # noqa: E501 + """Sync AWS Marketplace customer information to SaaSus # noqa: E501 + + Sync AWS Marketplace customer information to SaaSus. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sync_customer(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the sync_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.sync_customer_with_http_info(customer_identifier, **kwargs) # noqa: E501 + + @validate_arguments + def sync_customer_with_http_info(self, customer_identifier : Annotated[StrictStr, Field(..., description="Customer ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Sync AWS Marketplace customer information to SaaSus # noqa: E501 + + Sync AWS Marketplace customer information to SaaSus. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.sync_customer_with_http_info(customer_identifier, async_req=True) + >>> result = thread.get() + + :param customer_identifier: Customer ID (required) + :type customer_identifier: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'customer_identifier' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method sync_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['customer_identifier']: + _path_params['customer_identifier'] = _params['customer_identifier'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/customers/{customer_identifier}/sync', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_listing_status(self, update_listing_status_param : Optional[UpdateListingStatusParam] = None, **kwargs) -> None: # noqa: E501 + """Update AWS Marketplace Listing Status # noqa: E501 + + Update AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_listing_status(update_listing_status_param, async_req=True) + >>> result = thread.get() + + :param update_listing_status_param: + :type update_listing_status_param: UpdateListingStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_listing_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_listing_status_with_http_info(update_listing_status_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_listing_status_with_http_info(self, update_listing_status_param : Optional[UpdateListingStatusParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update AWS Marketplace Listing Status # noqa: E501 + + Update AWS Marketplace Listing Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_listing_status_with_http_info(update_listing_status_param, async_req=True) + >>> result = thread.get() + + :param update_listing_status_param: + :type update_listing_status_param: UpdateListingStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_listing_status_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_listing_status" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_listing_status_param'] is not None: + _body_params = _params['update_listing_status_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/listing-status', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_settings(self, update_settings_param : Optional[UpdateSettingsParam] = None, **kwargs) -> None: # noqa: E501 + """Update AWS Marketplace Settings # noqa: E501 + + Update AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_settings(update_settings_param, async_req=True) + >>> result = thread.get() + + :param update_settings_param: + :type update_settings_param: UpdateSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_settings_with_http_info(update_settings_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_settings_with_http_info(self, update_settings_param : Optional[UpdateSettingsParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update AWS Marketplace Settings # noqa: E501 + + Update AWS Marketplace Settings. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_settings_with_http_info(update_settings_param, async_req=True) + >>> result = thread.get() + + :param update_settings_param: + :type update_settings_param: UpdateSettingsParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_settings_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_settings_param'] is not None: + _body_params = _params['update_settings_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/settings', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def verify_registration_token(self, verify_registration_token_param : Optional[VerifyRegistrationTokenParam] = None, **kwargs) -> None: # noqa: E501 + """Verify Registration Token # noqa: E501 + + Verify Registration Token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.verify_registration_token(verify_registration_token_param, async_req=True) + >>> result = thread.get() + + :param verify_registration_token_param: + :type verify_registration_token_param: VerifyRegistrationTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the verify_registration_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.verify_registration_token_with_http_info(verify_registration_token_param, **kwargs) # noqa: E501 + + @validate_arguments + def verify_registration_token_with_http_info(self, verify_registration_token_param : Optional[VerifyRegistrationTokenParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Verify Registration Token # noqa: E501 + + Verify Registration Token. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.verify_registration_token_with_http_info(verify_registration_token_param, async_req=True) + >>> result = thread.get() + + :param verify_registration_token_param: + :type verify_registration_token_param: VerifyRegistrationTokenParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'verify_registration_token_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_registration_token" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['verify_registration_token_param'] is not None: + _body_params = _params['verify_registration_token_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/registration-token/verify', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/awsmarketplace/api/error_api.py b/test/awsmarketplace/api/error_api.py new file mode 100644 index 0000000..f8b294b --- /dev/null +++ b/test/awsmarketplace/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.awsmarketplace.api_client import ApiClient +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +from saasus_sdk_python.src.awsmarketplace.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/awsmarketplace/api_client.py b/test/awsmarketplace/api_client.py new file mode 100644 index 0000000..8d9d147 --- /dev/null +++ b/test/awsmarketplace/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.awsmarketplace.configuration import Configuration +from saasus_sdk_python.src.awsmarketplace.api_response import ApiResponse +import saasus_sdk_python.src.awsmarketplace.models +from saasus_sdk_python.src.awsmarketplace import rest +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.awsmarketplace.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/awsmarketplace/api_response.py b/test/awsmarketplace/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/awsmarketplace/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/awsmarketplace/configuration.py b/test/awsmarketplace/configuration.py new file mode 100644 index 0000000..c5fdc67 --- /dev/null +++ b/test/awsmarketplace/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/awsmarketplace" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.awsmarketplace") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/awsmarketplace", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/awsmarketplace/exceptions.py b/test/awsmarketplace/exceptions.py new file mode 100644 index 0000000..5b8f629 --- /dev/null +++ b/test/awsmarketplace/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/awsmarketplace/models/__init__.py b/test/awsmarketplace/models/__init__.py new file mode 100644 index 0000000..5409d6f --- /dev/null +++ b/test/awsmarketplace/models/__init__.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.awsmarketplace.models.catalog_entity_visibility import CatalogEntityVisibility +from saasus_sdk_python.src.awsmarketplace.models.cloud_formation_launch_stack_link import CloudFormationLaunchStackLink +from saasus_sdk_python.src.awsmarketplace.models.create_customer_param import CreateCustomerParam +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from saasus_sdk_python.src.awsmarketplace.models.customers import Customers +from saasus_sdk_python.src.awsmarketplace.models.error import Error +from saasus_sdk_python.src.awsmarketplace.models.get_listing_status_result import GetListingStatusResult +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from saasus_sdk_python.src.awsmarketplace.models.plans import Plans +from saasus_sdk_python.src.awsmarketplace.models.save_plan_param import SavePlanParam +from saasus_sdk_python.src.awsmarketplace.models.settings import Settings +from saasus_sdk_python.src.awsmarketplace.models.update_listing_status_param import UpdateListingStatusParam +from saasus_sdk_python.src.awsmarketplace.models.update_settings_param import UpdateSettingsParam +from saasus_sdk_python.src.awsmarketplace.models.verify_registration_token_param import VerifyRegistrationTokenParam +from saasus_sdk_python.src.awsmarketplace.models.visibility_status import VisibilityStatus diff --git a/test/awsmarketplace/models/catalog_entity_visibility.py b/test/awsmarketplace/models/catalog_entity_visibility.py new file mode 100644 index 0000000..37ca597 --- /dev/null +++ b/test/awsmarketplace/models/catalog_entity_visibility.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.visibility_status import VisibilityStatus + +class CatalogEntityVisibility(BaseModel): + """ + CatalogEntityVisibility + """ + visibility: VisibilityStatus = Field(...) + __properties = ["visibility"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CatalogEntityVisibility: + """Create an instance of CatalogEntityVisibility from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CatalogEntityVisibility: + """Create an instance of CatalogEntityVisibility from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CatalogEntityVisibility.parse_obj(obj) + + _obj = CatalogEntityVisibility.parse_obj({ + "visibility": obj.get("visibility") + }) + return _obj + + diff --git a/test/awsmarketplace/models/cloud_formation_launch_stack_link.py b/test/awsmarketplace/models/cloud_formation_launch_stack_link.py new file mode 100644 index 0000000..d6634d5 --- /dev/null +++ b/test/awsmarketplace/models/cloud_formation_launch_stack_link.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CloudFormationLaunchStackLink(BaseModel): + """ + CloudFormationLaunchStackLink + """ + link: StrictStr = Field(...) + __properties = ["link"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CloudFormationLaunchStackLink: + """Create an instance of CloudFormationLaunchStackLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CloudFormationLaunchStackLink.parse_obj(obj) + + _obj = CloudFormationLaunchStackLink.parse_obj({ + "link": obj.get("link") + }) + return _obj + + diff --git a/test/awsmarketplace/models/create_customer_param.py b/test/awsmarketplace/models/create_customer_param.py new file mode 100644 index 0000000..d8f5a33 --- /dev/null +++ b/test/awsmarketplace/models/create_customer_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateCustomerParam(BaseModel): + """ + CreateCustomerParam + """ + tenant_id: StrictStr = Field(...) + registration_token: StrictStr = Field(...) + __properties = ["tenant_id", "registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateCustomerParam: + """Create an instance of CreateCustomerParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateCustomerParam: + """Create an instance of CreateCustomerParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateCustomerParam.parse_obj(obj) + + _obj = CreateCustomerParam.parse_obj({ + "tenant_id": obj.get("tenant_id"), + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/test/awsmarketplace/models/customer.py b/test/awsmarketplace/models/customer.py new file mode 100644 index 0000000..7ef50e4 --- /dev/null +++ b/test/awsmarketplace/models/customer.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Customer(BaseModel): + """ + Customer + """ + customer_identifier: StrictStr = Field(...) + customer_aws_account_id: StrictStr = Field(...) + tenant_id: StrictStr = Field(...) + __properties = ["customer_identifier", "customer_aws_account_id", "tenant_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Customer: + """Create an instance of Customer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Customer: + """Create an instance of Customer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Customer.parse_obj(obj) + + _obj = Customer.parse_obj({ + "customer_identifier": obj.get("customer_identifier"), + "customer_aws_account_id": obj.get("customer_aws_account_id"), + "tenant_id": obj.get("tenant_id") + }) + return _obj + + diff --git a/test/awsmarketplace/models/customers.py b/test/awsmarketplace/models/customers.py new file mode 100644 index 0000000..d75e4d7 --- /dev/null +++ b/test/awsmarketplace/models/customers.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.customer import Customer +from typing_extensions import Annotated + +class Customers(BaseModel): + """ + Customers + """ + customers: Annotated[List[Customer], Field()] = Field(...) + __properties = ["customers"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Customers: + """Create an instance of Customers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in customers (list) + _items = [] + if self.customers: + for _item in self.customers: + if _item: + _items.append(_item.to_dict()) + _dict['customers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Customers: + """Create an instance of Customers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Customers.parse_obj(obj) + + _obj = Customers.parse_obj({ + "customers": [Customer.from_dict(_item) for _item in obj.get("customers")] if obj.get("customers") is not None else None + }) + return _obj + + diff --git a/test/awsmarketplace/models/error.py b/test/awsmarketplace/models/error.py new file mode 100644 index 0000000..d63f0b0 --- /dev/null +++ b/test/awsmarketplace/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(...) + message: StrictStr = Field(...) + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/awsmarketplace/models/get_listing_status_result.py b/test/awsmarketplace/models/get_listing_status_result.py new file mode 100644 index 0000000..def5633 --- /dev/null +++ b/test/awsmarketplace/models/get_listing_status_result.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus + +class GetListingStatusResult(BaseModel): + """ + GetListingStatusResult + """ + listing_status: ListingStatus = Field(...) + __properties = ["listing_status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> GetListingStatusResult: + """Create an instance of GetListingStatusResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> GetListingStatusResult: + """Create an instance of GetListingStatusResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return GetListingStatusResult.parse_obj(obj) + + _obj = GetListingStatusResult.parse_obj({ + "listing_status": obj.get("listing_status") + }) + return _obj + + diff --git a/test/awsmarketplace/models/listing_status.py b/test/awsmarketplace/models/listing_status.py new file mode 100644 index 0000000..981aca9 --- /dev/null +++ b/test/awsmarketplace/models/listing_status.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class ListingStatus(str, Enum): + """ + ListingStatus + """ + + """ + allowed enum values + """ + NO_LISTING = 'no_listing' + FIRST_STEP_WORKING = 'first_step_working' + FIRST_STEP_COMPLETED = 'first_step_completed' + SECOND_STEP_WORKING = 'second_step_working' + SECOND_STEP_PLAN_CREATED = 'second_step_plan_created' + SECOND_STEP_COMPLETED = 'second_step_completed' + THIRD_STEP_WORKING = 'third_step_working' + THIRD_STEP_COMPLETED = 'third_step_completed' + LIMITED = 'limited' + RESTRICTED = 'restricted' + PUBLIC = 'public' + + @classmethod + def from_json(cls, json_str: str) -> ListingStatus: + """Create an instance of ListingStatus from a JSON string""" + return ListingStatus(json.loads(json_str)) + + diff --git a/test/awsmarketplace/models/plan.py b/test/awsmarketplace/models/plan.py new file mode 100644 index 0000000..27591f7 --- /dev/null +++ b/test/awsmarketplace/models/plan.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Plan(BaseModel): + """ + Plan + """ + plan_id: StrictStr = Field(...) + plan_name: StrictStr = Field(...) + __properties = ["plan_id", "plan_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Plan: + """Create an instance of Plan from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Plan: + """Create an instance of Plan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Plan.parse_obj(obj) + + _obj = Plan.parse_obj({ + "plan_id": obj.get("plan_id"), + "plan_name": obj.get("plan_name") + }) + return _obj + + diff --git a/test/awsmarketplace/models/plans.py b/test/awsmarketplace/models/plans.py new file mode 100644 index 0000000..aecda7f --- /dev/null +++ b/test/awsmarketplace/models/plans.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.plan import Plan +from typing_extensions import Annotated + +class Plans(BaseModel): + """ + Plans + """ + plans: Annotated[List[Plan], Field()] = Field(...) + __properties = ["plans"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Plans: + """Create an instance of Plans from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in plans (list) + _items = [] + if self.plans: + for _item in self.plans: + if _item: + _items.append(_item.to_dict()) + _dict['plans'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Plans: + """Create an instance of Plans from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Plans.parse_obj(obj) + + _obj = Plans.parse_obj({ + "plans": [Plan.from_dict(_item) for _item in obj.get("plans")] if obj.get("plans") is not None else None + }) + return _obj + + diff --git a/test/awsmarketplace/models/save_plan_param.py b/test/awsmarketplace/models/save_plan_param.py new file mode 100644 index 0000000..dc8eca5 --- /dev/null +++ b/test/awsmarketplace/models/save_plan_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class SavePlanParam(BaseModel): + """ + SavePlanParam + """ + plan_id: StrictStr = Field(...) + plan_name: StrictStr = Field(...) + __properties = ["plan_id", "plan_name"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SavePlanParam: + """Create an instance of SavePlanParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SavePlanParam: + """Create an instance of SavePlanParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SavePlanParam.parse_obj(obj) + + _obj = SavePlanParam.parse_obj({ + "plan_id": obj.get("plan_id"), + "plan_name": obj.get("plan_name") + }) + return _obj + + diff --git a/test/awsmarketplace/models/settings.py b/test/awsmarketplace/models/settings.py new file mode 100644 index 0000000..52c7a04 --- /dev/null +++ b/test/awsmarketplace/models/settings.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Settings(BaseModel): + """ + Settings + """ + product_code: StrictStr = Field(...) + role_arn: StrictStr = Field(...) + role_external_id: StrictStr = Field(...) + sns_topic_arn: StrictStr = Field(...) + cas_bucket_name: StrictStr = Field(...) + cas_sns_topic_arn: StrictStr = Field(...) + seller_sns_topic_arn: StrictStr = Field(...) + redirect_sign_up_page_function_url: StrictStr = Field(...) + sqs_arn: StrictStr = Field(...) + __properties = ["product_code", "role_arn", "role_external_id", "sns_topic_arn", "cas_bucket_name", "cas_sns_topic_arn", "seller_sns_topic_arn", "redirect_sign_up_page_function_url", "sqs_arn"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Settings: + """Create an instance of Settings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Settings: + """Create an instance of Settings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Settings.parse_obj(obj) + + _obj = Settings.parse_obj({ + "product_code": obj.get("product_code"), + "role_arn": obj.get("role_arn"), + "role_external_id": obj.get("role_external_id"), + "sns_topic_arn": obj.get("sns_topic_arn"), + "cas_bucket_name": obj.get("cas_bucket_name"), + "cas_sns_topic_arn": obj.get("cas_sns_topic_arn"), + "seller_sns_topic_arn": obj.get("seller_sns_topic_arn"), + "redirect_sign_up_page_function_url": obj.get("redirect_sign_up_page_function_url"), + "sqs_arn": obj.get("sqs_arn") + }) + return _obj + + diff --git a/test/awsmarketplace/models/update_listing_status_param.py b/test/awsmarketplace/models/update_listing_status_param.py new file mode 100644 index 0000000..276545a --- /dev/null +++ b/test/awsmarketplace/models/update_listing_status_param.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field +from saasus_sdk_python.src.awsmarketplace.models.listing_status import ListingStatus + +class UpdateListingStatusParam(BaseModel): + """ + UpdateListingStatusParam + """ + listing_status: ListingStatus = Field(...) + __properties = ["listing_status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateListingStatusParam: + """Create an instance of UpdateListingStatusParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateListingStatusParam: + """Create an instance of UpdateListingStatusParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateListingStatusParam.parse_obj(obj) + + _obj = UpdateListingStatusParam.parse_obj({ + "listing_status": obj.get("listing_status") + }) + return _obj + + diff --git a/test/awsmarketplace/models/update_settings_param.py b/test/awsmarketplace/models/update_settings_param.py new file mode 100644 index 0000000..85b8efe --- /dev/null +++ b/test/awsmarketplace/models/update_settings_param.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, StrictStr + +class UpdateSettingsParam(BaseModel): + """ + UpdateSettingsParam + """ + product_code: Optional[StrictStr] = None + role_arn: Optional[StrictStr] = None + role_external_id: Optional[StrictStr] = None + sns_topic_arn: Optional[StrictStr] = None + cas_bucket_name: Optional[StrictStr] = None + cas_sns_topic_arn: Optional[StrictStr] = None + seller_sns_topic_arn: Optional[StrictStr] = None + sqs_arn: Optional[StrictStr] = None + __properties = ["product_code", "role_arn", "role_external_id", "sns_topic_arn", "cas_bucket_name", "cas_sns_topic_arn", "seller_sns_topic_arn", "sqs_arn"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateSettingsParam: + """Create an instance of UpdateSettingsParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateSettingsParam: + """Create an instance of UpdateSettingsParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateSettingsParam.parse_obj(obj) + + _obj = UpdateSettingsParam.parse_obj({ + "product_code": obj.get("product_code"), + "role_arn": obj.get("role_arn"), + "role_external_id": obj.get("role_external_id"), + "sns_topic_arn": obj.get("sns_topic_arn"), + "cas_bucket_name": obj.get("cas_bucket_name"), + "cas_sns_topic_arn": obj.get("cas_sns_topic_arn"), + "seller_sns_topic_arn": obj.get("seller_sns_topic_arn"), + "sqs_arn": obj.get("sqs_arn") + }) + return _obj + + diff --git a/test/awsmarketplace/models/verify_registration_token_param.py b/test/awsmarketplace/models/verify_registration_token_param.py new file mode 100644 index 0000000..6174374 --- /dev/null +++ b/test/awsmarketplace/models/verify_registration_token_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class VerifyRegistrationTokenParam(BaseModel): + """ + VerifyRegistrationTokenParam + """ + registration_token: StrictStr = Field(...) + __properties = ["registration_token"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> VerifyRegistrationTokenParam: + """Create an instance of VerifyRegistrationTokenParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> VerifyRegistrationTokenParam: + """Create an instance of VerifyRegistrationTokenParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VerifyRegistrationTokenParam.parse_obj(obj) + + _obj = VerifyRegistrationTokenParam.parse_obj({ + "registration_token": obj.get("registration_token") + }) + return _obj + + diff --git a/test/awsmarketplace/models/visibility_status.py b/test/awsmarketplace/models/visibility_status.py new file mode 100644 index 0000000..938645b --- /dev/null +++ b/test/awsmarketplace/models/visibility_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class VisibilityStatus(str, Enum): + """ + VisibilityStatus + """ + + """ + allowed enum values + """ + PUBLIC = 'Public' + LIMITED = 'Limited' + RESTRICTED = 'Restricted' + + @classmethod + def from_json(cls, json_str: str) -> VisibilityStatus: + """Create an instance of VisibilityStatus from a JSON string""" + return VisibilityStatus(json.loads(json_str)) + + diff --git a/test/awsmarketplace/py.typed b/test/awsmarketplace/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/awsmarketplace/rest.py b/test/awsmarketplace/rest.py new file mode 100644 index 0000000..2cfb1c3 --- /dev/null +++ b/test/awsmarketplace/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus AWS Marketplace API Schema + + SaaSus AWS Marketplace API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.awsmarketplace.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/test/billing/__init__.py b/test/billing/__init__.py new file mode 100644 index 0000000..3cc26ba --- /dev/null +++ b/test/billing/__init__.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.billing.api.error_api import ErrorApi +from saasus_sdk_python.src.billing.api.stripe_api import StripeApi + +# import ApiClient +from saasus_sdk_python.src.billing.api_response import ApiResponse +from saasus_sdk_python.src.billing.api_client import ApiClient +from saasus_sdk_python.src.billing.configuration import Configuration +from saasus_sdk_python.src.billing.exceptions import OpenApiException +from saasus_sdk_python.src.billing.exceptions import ApiTypeError +from saasus_sdk_python.src.billing.exceptions import ApiValueError +from saasus_sdk_python.src.billing.exceptions import ApiKeyError +from saasus_sdk_python.src.billing.exceptions import ApiAttributeError +from saasus_sdk_python.src.billing.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.billing.models.error import Error +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam diff --git a/test/billing/api/__init__.py b/test/billing/api/__init__.py new file mode 100644 index 0000000..1cb0ed8 --- /dev/null +++ b/test/billing/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.billing.api.error_api import ErrorApi +from saasus_sdk_python.src.billing.api.stripe_api import StripeApi + diff --git a/test/billing/api/error_api.py b/test/billing/api/error_api.py new file mode 100644 index 0000000..8142f52 --- /dev/null +++ b/test/billing/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.billing.api_client import ApiClient +from saasus_sdk_python.src.billing.api_response import ApiResponse +from saasus_sdk_python.src.billing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/billing/api/stripe_api.py b/test/billing/api/stripe_api.py new file mode 100644 index 0000000..699ee02 --- /dev/null +++ b/test/billing/api/stripe_api.py @@ -0,0 +1,450 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam + +from saasus_sdk_python.src.billing.api_client import ApiClient +from saasus_sdk_python.src.billing.api_response import ApiResponse +from saasus_sdk_python.src.billing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class StripeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def delete_stripe_info(self, **kwargs) -> None: # noqa: E501 + """Delete Stripe Connection # noqa: E501 + + Delete connection with external billing SaaS # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_stripe_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_stripe_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_stripe_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Stripe Connection # noqa: E501 + + Delete connection with external billing SaaS # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stripe_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/info', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_stripe_info(self, **kwargs) -> StripeInfo: # noqa: E501 + """Get Stripe Connection information # noqa: E501 + + Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: StripeInfo + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_stripe_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_stripe_info_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_stripe_info_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Stripe Connection information # noqa: E501 + + Get information on connnections with external billing SaaS. Currently possible to integrate with Stripe. Without integration, you will need to implement billing using the SaaSus SDK/API. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StripeInfo, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stripe_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "StripeInfo", + '500': "Error", + } + + return self.api_client.call_api( + '/stripe/info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_stripe_info(self, update_stripe_info_param : Optional[UpdateStripeInfoParam] = None, **kwargs) -> None: # noqa: E501 + """Update Stripe Connection Info # noqa: E501 + + Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_stripe_info(update_stripe_info_param, async_req=True) + >>> result = thread.get() + + :param update_stripe_info_param: + :type update_stripe_info_param: UpdateStripeInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_stripe_info_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_stripe_info_with_http_info(update_stripe_info_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_stripe_info_with_http_info(self, update_stripe_info_param : Optional[UpdateStripeInfoParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Stripe Connection Info # noqa: E501 + + Updates information on connection with external billing SaaS. Currently possible to connect to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_stripe_info_with_http_info(update_stripe_info_param, async_req=True) + >>> result = thread.get() + + :param update_stripe_info_param: + :type update_stripe_info_param: UpdateStripeInfoParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_stripe_info_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_stripe_info" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_stripe_info_param'] is not None: + _body_params = _params['update_stripe_info_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/billing/api_client.py b/test/billing/api_client.py new file mode 100644 index 0000000..3ce5868 --- /dev/null +++ b/test/billing/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.billing.configuration import Configuration +from saasus_sdk_python.src.billing.api_response import ApiResponse +import saasus_sdk_python.src.billing.models +from saasus_sdk_python.src.billing import rest +from saasus_sdk_python.src.billing.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.billing.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/billing/api_response.py b/test/billing/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/billing/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/billing/configuration.py b/test/billing/configuration.py new file mode 100644 index 0000000..c3a0713 --- /dev/null +++ b/test/billing/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.billing.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/billing" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.billing") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/billing", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/billing/exceptions.py b/test/billing/exceptions.py new file mode 100644 index 0000000..fa9079d --- /dev/null +++ b/test/billing/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/billing/models/__init__.py b/test/billing/models/__init__.py new file mode 100644 index 0000000..782decc --- /dev/null +++ b/test/billing/models/__init__.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.billing.models.error import Error +from saasus_sdk_python.src.billing.models.stripe_info import StripeInfo +from saasus_sdk_python.src.billing.models.update_stripe_info_param import UpdateStripeInfoParam diff --git a/test/billing/models/error.py b/test/billing/models/error.py new file mode 100644 index 0000000..62d979d --- /dev/null +++ b/test/billing/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/billing/models/stripe_info.py b/test/billing/models/stripe_info.py new file mode 100644 index 0000000..64aa8f0 --- /dev/null +++ b/test/billing/models/stripe_info.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool + +class StripeInfo(BaseModel): + """ + StripeInfo + """ + is_registered: StrictBool = Field(...) + __properties = ["is_registered"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StripeInfo: + """Create an instance of StripeInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StripeInfo: + """Create an instance of StripeInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StripeInfo.parse_obj(obj) + + _obj = StripeInfo.parse_obj({ + "is_registered": obj.get("is_registered") + }) + return _obj + + diff --git a/test/billing/models/update_stripe_info_param.py b/test/billing/models/update_stripe_info_param.py new file mode 100644 index 0000000..6fe0d93 --- /dev/null +++ b/test/billing/models/update_stripe_info_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateStripeInfoParam(BaseModel): + """ + UpdateStripeInfoParam + """ + secret_key: StrictStr = Field(..., description="secret key") + __properties = ["secret_key"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateStripeInfoParam: + """Create an instance of UpdateStripeInfoParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateStripeInfoParam: + """Create an instance of UpdateStripeInfoParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateStripeInfoParam.parse_obj(obj) + + _obj = UpdateStripeInfoParam.parse_obj({ + "secret_key": obj.get("secret_key") + }) + return _obj + + diff --git a/test/billing/py.typed b/test/billing/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/billing/rest.py b/test/billing/rest.py new file mode 100644 index 0000000..6c8ec97 --- /dev/null +++ b/test/billing/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Billing API Schema + + SaaSus Billing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.billing.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/test/communication/__init__.py b/test/communication/__init__.py new file mode 100644 index 0000000..b5453a4 --- /dev/null +++ b/test/communication/__init__.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.communication.api.error_api import ErrorApi +from saasus_sdk_python.src.communication.api.feedback_api import FeedbackApi + +# import ApiClient +from saasus_sdk_python.src.communication.api_response import ApiResponse +from saasus_sdk_python.src.communication.api_client import ApiClient +from saasus_sdk_python.src.communication.configuration import Configuration +from saasus_sdk_python.src.communication.exceptions import OpenApiException +from saasus_sdk_python.src.communication.exceptions import ApiTypeError +from saasus_sdk_python.src.communication.exceptions import ApiValueError +from saasus_sdk_python.src.communication.exceptions import ApiKeyError +from saasus_sdk_python.src.communication.exceptions import ApiAttributeError +from saasus_sdk_python.src.communication.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.comments import Comments +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.error import Error +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.models.user import User +from saasus_sdk_python.src.communication.models.users import Users +from saasus_sdk_python.src.communication.models.votes import Votes diff --git a/test/communication/api/__init__.py b/test/communication/api/__init__.py new file mode 100644 index 0000000..a85839b --- /dev/null +++ b/test/communication/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.communication.api.error_api import ErrorApi +from saasus_sdk_python.src.communication.api.feedback_api import FeedbackApi + diff --git a/test/communication/api/error_api.py b/test/communication/api/error_api.py new file mode 100644 index 0000000..6d7b636 --- /dev/null +++ b/test/communication/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.communication.api_client import ApiClient +from saasus_sdk_python.src.communication.api_response import ApiResponse +from saasus_sdk_python.src.communication.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/communication/api/feedback_api.py b/test/communication/api/feedback_api.py new file mode 100644 index 0000000..20fda36 --- /dev/null +++ b/test/communication/api/feedback_api.py @@ -0,0 +1,1827 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import StrictStr + +from typing import Optional + +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.models.votes import Votes + +from saasus_sdk_python.src.communication.api_client import ApiClient +from saasus_sdk_python.src.communication.api_response import ApiResponse +from saasus_sdk_python.src.communication.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class FeedbackApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_feedback(self, create_feedback_param : Optional[CreateFeedbackParam] = None, **kwargs) -> Feedback: # noqa: E501 + """Create Feedback # noqa: E501 + + Create Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback(create_feedback_param, async_req=True) + >>> result = thread.get() + + :param create_feedback_param: + :type create_feedback_param: CreateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Feedback + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_feedback_with_http_info(create_feedback_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_feedback_with_http_info(self, create_feedback_param : Optional[CreateFeedbackParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Feedback # noqa: E501 + + Create Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback_with_http_info(create_feedback_param, async_req=True) + >>> result = thread.get() + + :param create_feedback_param: + :type create_feedback_param: CreateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Feedback, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'create_feedback_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_feedback_param'] is not None: + _body_params = _params['create_feedback_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Feedback", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_feedback_comment(self, feedback_id : StrictStr, create_feedback_comment_param : Optional[CreateFeedbackCommentParam] = None, **kwargs) -> Comment: # noqa: E501 + """Create Feedback Comment # noqa: E501 + + Post comment to feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback_comment(feedback_id, create_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_feedback_comment_param: + :type create_feedback_comment_param: CreateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Comment + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_feedback_comment_with_http_info(feedback_id, create_feedback_comment_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_feedback_comment_with_http_info(self, feedback_id : StrictStr, create_feedback_comment_param : Optional[CreateFeedbackCommentParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Feedback Comment # noqa: E501 + + Post comment to feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_feedback_comment_with_http_info(feedback_id, create_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_feedback_comment_param: + :type create_feedback_comment_param: CreateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Comment, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'create_feedback_comment_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_feedback_comment_param'] is not None: + _body_params = _params['create_feedback_comment_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Comment", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_vote_user(self, feedback_id : StrictStr, create_vote_user_param : Optional[CreateVoteUserParam] = None, **kwargs) -> Votes: # noqa: E501 + """Create Vote User # noqa: E501 + + Vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_vote_user(feedback_id, create_vote_user_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_vote_user_param: + :type create_vote_user_param: CreateVoteUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Votes + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_vote_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_vote_user_with_http_info(feedback_id, create_vote_user_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_vote_user_with_http_info(self, feedback_id : StrictStr, create_vote_user_param : Optional[CreateVoteUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Vote User # noqa: E501 + + Vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_vote_user_with_http_info(feedback_id, create_vote_user_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param create_vote_user_param: + :type create_vote_user_param: CreateVoteUserParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Votes, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'create_vote_user_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_vote_user" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_vote_user_param'] is not None: + _body_params = _params['create_vote_user_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "Votes", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/votes/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_feedback(self, feedback_id : StrictStr, **kwargs) -> None: # noqa: E501 + """Delete Feedback # noqa: E501 + + Delete Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_feedback_with_http_info(feedback_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_feedback_with_http_info(self, feedback_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Feedback # noqa: E501 + + Delete Feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback_with_http_info(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_feedback_comment(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> None: # noqa: E501 + """Delete Feedback Comment # noqa: E501 + + Delete comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback_comment(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_feedback_comment_with_http_info(feedback_id, comment_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_feedback_comment_with_http_info(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Feedback Comment # noqa: E501 + + Delete comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_feedback_comment_with_http_info(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'comment_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['comment_id']: + _path_params['comment_id'] = _params['comment_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments/{comment_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_vote_for_feedback(self, feedback_id : StrictStr, user_id : StrictStr, **kwargs) -> None: # noqa: E501 + """Delete Vote For Feedback # noqa: E501 + + Cancel vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_vote_for_feedback(feedback_id, user_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param user_id: (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_vote_for_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_vote_for_feedback_with_http_info(feedback_id, user_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_vote_for_feedback_with_http_info(self, feedback_id : StrictStr, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Vote For Feedback # noqa: E501 + + Cancel vote for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_vote_for_feedback_with_http_info(feedback_id, user_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param user_id: (required) + :type user_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'user_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_vote_for_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['user_id']: + _path_params['user_id'] = _params['user_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/votes/users/{user_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_feedback(self, feedback_id : StrictStr, **kwargs) -> Feedback: # noqa: E501 + """Get Feedback # noqa: E501 + + Retrieve feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Feedback + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_feedback_with_http_info(feedback_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_feedback_with_http_info(self, feedback_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Get Feedback # noqa: E501 + + Retrieve feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback_with_http_info(feedback_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Feedback, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Feedback", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_feedback_comment(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> Comment: # noqa: E501 + """Get Feedback Comment # noqa: E501 + + Retrieve comment from feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback_comment(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Comment + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_feedback_comment_with_http_info(feedback_id, comment_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_feedback_comment_with_http_info(self, feedback_id : StrictStr, comment_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + """Get Feedback Comment # noqa: E501 + + Retrieve comment from feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedback_comment_with_http_info(feedback_id, comment_id, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Comment, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'comment_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['comment_id']: + _path_params['comment_id'] = _params['comment_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Comment", + '404': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments/{comment_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_feedbacks(self, **kwargs) -> Feedbacks: # noqa: E501 + """Get Feedbacks # noqa: E501 + + Get the list of feedbacks. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedbacks(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Feedbacks + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_feedbacks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_feedbacks_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_feedbacks_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Feedbacks # noqa: E501 + + Get the list of feedbacks. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_feedbacks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Feedbacks, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_feedbacks" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "Feedbacks", + '500': "Error", + } + + return self.api_client.call_api( + '/feedbacks', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_feedback(self, feedback_id : StrictStr, update_feedback_param : Optional[UpdateFeedbackParam] = None, **kwargs) -> None: # noqa: E501 + """Update Feedback # noqa: E501 + + Edit feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback(feedback_id, update_feedback_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_param: + :type update_feedback_param: UpdateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_feedback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_feedback_with_http_info(feedback_id, update_feedback_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_feedback_with_http_info(self, feedback_id : StrictStr, update_feedback_param : Optional[UpdateFeedbackParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Feedback # noqa: E501 + + Edit feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_with_http_info(feedback_id, update_feedback_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_param: + :type update_feedback_param: UpdateFeedbackParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'update_feedback_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_feedback" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_feedback_param'] is not None: + _body_params = _params['update_feedback_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_feedback_comment(self, feedback_id : StrictStr, comment_id : StrictStr, update_feedback_comment_param : Optional[UpdateFeedbackCommentParam] = None, **kwargs) -> None: # noqa: E501 + """Update Feedback Comment # noqa: E501 + + Edit comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_comment(feedback_id, comment_id, update_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param update_feedback_comment_param: + :type update_feedback_comment_param: UpdateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_feedback_comment_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_feedback_comment_with_http_info(feedback_id, comment_id, update_feedback_comment_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_feedback_comment_with_http_info(self, feedback_id : StrictStr, comment_id : StrictStr, update_feedback_comment_param : Optional[UpdateFeedbackCommentParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Feedback Comment # noqa: E501 + + Edit comment for feedback. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_comment_with_http_info(feedback_id, comment_id, update_feedback_comment_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param comment_id: (required) + :type comment_id: str + :param update_feedback_comment_param: + :type update_feedback_comment_param: UpdateFeedbackCommentParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'comment_id', + 'update_feedback_comment_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_feedback_comment" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + if _params['comment_id']: + _path_params['comment_id'] = _params['comment_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_feedback_comment_param'] is not None: + _body_params = _params['update_feedback_comment_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/comments/{comment_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_feedback_status(self, feedback_id : StrictStr, update_feedback_status_param : Optional[UpdateFeedbackStatusParam] = None, **kwargs) -> None: # noqa: E501 + """Update Feedback Status # noqa: E501 + + Update Feedback Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_status(feedback_id, update_feedback_status_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_status_param: + :type update_feedback_status_param: UpdateFeedbackStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_feedback_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_feedback_status_with_http_info(feedback_id, update_feedback_status_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_feedback_status_with_http_info(self, feedback_id : StrictStr, update_feedback_status_param : Optional[UpdateFeedbackStatusParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Feedback Status # noqa: E501 + + Update Feedback Status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_feedback_status_with_http_info(feedback_id, update_feedback_status_param, async_req=True) + >>> result = thread.get() + + :param feedback_id: (required) + :type feedback_id: str + :param update_feedback_status_param: + :type update_feedback_status_param: UpdateFeedbackStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'feedback_id', + 'update_feedback_status_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_feedback_status" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['feedback_id']: + _path_params['feedback_id'] = _params['feedback_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_feedback_status_param'] is not None: + _body_params = _params['update_feedback_status_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/feedbacks/{feedback_id}/status', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/communication/api_client.py b/test/communication/api_client.py new file mode 100644 index 0000000..c2f481d --- /dev/null +++ b/test/communication/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.communication.configuration import Configuration +from saasus_sdk_python.src.communication.api_response import ApiResponse +import saasus_sdk_python.src.communication.models +from saasus_sdk_python.src.communication import rest +from saasus_sdk_python.src.communication.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.communication.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/communication/api_response.py b/test/communication/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/communication/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/communication/configuration.py b/test/communication/configuration.py new file mode 100644 index 0000000..0d3333c --- /dev/null +++ b/test/communication/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.communication.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/communication" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.communication") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/communication", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/communication/exceptions.py b/test/communication/exceptions.py new file mode 100644 index 0000000..a4b72f0 --- /dev/null +++ b/test/communication/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/communication/models/__init__.py b/test/communication/models/__init__.py new file mode 100644 index 0000000..9ca3c3f --- /dev/null +++ b/test/communication/models/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.comments import Comments +from saasus_sdk_python.src.communication.models.create_feedback_comment_param import CreateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.create_feedback_param import CreateFeedbackParam +from saasus_sdk_python.src.communication.models.create_vote_user_param import CreateVoteUserParam +from saasus_sdk_python.src.communication.models.error import Error +from saasus_sdk_python.src.communication.models.feedback import Feedback +from saasus_sdk_python.src.communication.models.feedback_save_props import FeedbackSaveProps +from saasus_sdk_python.src.communication.models.feedbacks import Feedbacks +from saasus_sdk_python.src.communication.models.update_feedback_comment_param import UpdateFeedbackCommentParam +from saasus_sdk_python.src.communication.models.update_feedback_param import UpdateFeedbackParam +from saasus_sdk_python.src.communication.models.update_feedback_status_param import UpdateFeedbackStatusParam +from saasus_sdk_python.src.communication.models.user import User +from saasus_sdk_python.src.communication.models.users import Users +from saasus_sdk_python.src.communication.models.votes import Votes diff --git a/test/communication/models/comment.py b/test/communication/models/comment.py new file mode 100644 index 0000000..a2f73f8 --- /dev/null +++ b/test/communication/models/comment.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class Comment(BaseModel): + """ + Comment + """ + id: StrictStr = Field(...) + created_at: StrictInt = Field(...) + body: StrictStr = Field(...) + __properties = ["id", "created_at", "body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Comment: + """Create an instance of Comment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Comment: + """Create an instance of Comment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Comment.parse_obj(obj) + + _obj = Comment.parse_obj({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "body": obj.get("body") + }) + return _obj + + diff --git a/test/communication/models/comments.py b/test/communication/models/comments.py new file mode 100644 index 0000000..a9cc435 --- /dev/null +++ b/test/communication/models/comments.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.communication.models.comment import Comment +from typing_extensions import Annotated + +class Comments(BaseModel): + """ + Comments + """ + comments: Annotated[List[Comment], Field()] = Field(...) + __properties = ["comments"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Comments: + """Create an instance of Comments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in comments (list) + _items = [] + if self.comments: + for _item in self.comments: + if _item: + _items.append(_item.to_dict()) + _dict['comments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Comments: + """Create an instance of Comments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Comments.parse_obj(obj) + + _obj = Comments.parse_obj({ + "comments": [Comment.from_dict(_item) for _item in obj.get("comments")] if obj.get("comments") is not None else None + }) + return _obj + + diff --git a/test/communication/models/create_feedback_comment_param.py b/test/communication/models/create_feedback_comment_param.py new file mode 100644 index 0000000..cc3e102 --- /dev/null +++ b/test/communication/models/create_feedback_comment_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateFeedbackCommentParam(BaseModel): + """ + CreateFeedbackCommentParam + """ + body: StrictStr = Field(...) + __properties = ["body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateFeedbackCommentParam: + """Create an instance of CreateFeedbackCommentParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateFeedbackCommentParam: + """Create an instance of CreateFeedbackCommentParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateFeedbackCommentParam.parse_obj(obj) + + _obj = CreateFeedbackCommentParam.parse_obj({ + "body": obj.get("body") + }) + return _obj + + diff --git a/test/communication/models/create_feedback_param.py b/test/communication/models/create_feedback_param.py new file mode 100644 index 0000000..3d9e572 --- /dev/null +++ b/test/communication/models/create_feedback_param.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateFeedbackParam(BaseModel): + """ + CreateFeedbackParam + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + user_id: StrictStr = Field(...) + __properties = ["feedback_title", "feedback_description", "user_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateFeedbackParam: + """Create an instance of CreateFeedbackParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateFeedbackParam: + """Create an instance of CreateFeedbackParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateFeedbackParam.parse_obj(obj) + + _obj = CreateFeedbackParam.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description"), + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/test/communication/models/create_vote_user_param.py b/test/communication/models/create_vote_user_param.py new file mode 100644 index 0000000..759041c --- /dev/null +++ b/test/communication/models/create_vote_user_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class CreateVoteUserParam(BaseModel): + """ + CreateVoteUserParam + """ + user_id: StrictStr = Field(...) + __properties = ["user_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateVoteUserParam: + """Create an instance of CreateVoteUserParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateVoteUserParam: + """Create an instance of CreateVoteUserParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateVoteUserParam.parse_obj(obj) + + _obj = CreateVoteUserParam.parse_obj({ + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/test/communication/models/error.py b/test/communication/models/error.py new file mode 100644 index 0000000..cd18774 --- /dev/null +++ b/test/communication/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/communication/models/feedback.py b/test/communication/models/feedback.py new file mode 100644 index 0000000..822f221 --- /dev/null +++ b/test/communication/models/feedback.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.communication.models.comment import Comment +from saasus_sdk_python.src.communication.models.user import User +from typing_extensions import Annotated + +class Feedback(BaseModel): + """ + Feedback + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + comments: Annotated[List[Comment], Field()] = Field(...) + count: StrictInt = Field(...) + users: Annotated[List[User], Field()] = Field(...) + id: StrictStr = Field(...) + user_id: StrictStr = Field(...) + created_at: StrictInt = Field(...) + status: StrictInt = Field(...) + __properties = ["feedback_title", "feedback_description", "comments", "count", "users", "id", "user_id", "created_at", "status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Feedback: + """Create an instance of Feedback from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in comments (list) + _items = [] + if self.comments: + for _item in self.comments: + if _item: + _items.append(_item.to_dict()) + _dict['comments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Feedback: + """Create an instance of Feedback from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Feedback.parse_obj(obj) + + _obj = Feedback.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description"), + "comments": [Comment.from_dict(_item) for _item in obj.get("comments")] if obj.get("comments") is not None else None, + "count": obj.get("count"), + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None, + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "created_at": obj.get("created_at"), + "status": obj.get("status") + }) + return _obj + + diff --git a/test/communication/models/feedback_save_props.py b/test/communication/models/feedback_save_props.py new file mode 100644 index 0000000..c4ebf51 --- /dev/null +++ b/test/communication/models/feedback_save_props.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class FeedbackSaveProps(BaseModel): + """ + FeedbackSaveProps + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + __properties = ["feedback_title", "feedback_description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> FeedbackSaveProps: + """Create an instance of FeedbackSaveProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> FeedbackSaveProps: + """Create an instance of FeedbackSaveProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FeedbackSaveProps.parse_obj(obj) + + _obj = FeedbackSaveProps.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description") + }) + return _obj + + diff --git a/test/communication/models/feedbacks.py b/test/communication/models/feedbacks.py new file mode 100644 index 0000000..272d6d6 --- /dev/null +++ b/test/communication/models/feedbacks.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.communication.models.feedback import Feedback +from typing_extensions import Annotated + +class Feedbacks(BaseModel): + """ + Feedbacks + """ + feedbacks: Annotated[List[Feedback], Field()] = Field(...) + __properties = ["feedbacks"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Feedbacks: + """Create an instance of Feedbacks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in feedbacks (list) + _items = [] + if self.feedbacks: + for _item in self.feedbacks: + if _item: + _items.append(_item.to_dict()) + _dict['feedbacks'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Feedbacks: + """Create an instance of Feedbacks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Feedbacks.parse_obj(obj) + + _obj = Feedbacks.parse_obj({ + "feedbacks": [Feedback.from_dict(_item) for _item in obj.get("feedbacks")] if obj.get("feedbacks") is not None else None + }) + return _obj + + diff --git a/test/communication/models/update_feedback_comment_param.py b/test/communication/models/update_feedback_comment_param.py new file mode 100644 index 0000000..011984f --- /dev/null +++ b/test/communication/models/update_feedback_comment_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateFeedbackCommentParam(BaseModel): + """ + UpdateFeedbackCommentParam + """ + body: StrictStr = Field(...) + __properties = ["body"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateFeedbackCommentParam: + """Create an instance of UpdateFeedbackCommentParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateFeedbackCommentParam: + """Create an instance of UpdateFeedbackCommentParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateFeedbackCommentParam.parse_obj(obj) + + _obj = UpdateFeedbackCommentParam.parse_obj({ + "body": obj.get("body") + }) + return _obj + + diff --git a/test/communication/models/update_feedback_param.py b/test/communication/models/update_feedback_param.py new file mode 100644 index 0000000..fd502ba --- /dev/null +++ b/test/communication/models/update_feedback_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateFeedbackParam(BaseModel): + """ + UpdateFeedbackParam + """ + feedback_title: StrictStr = Field(...) + feedback_description: StrictStr = Field(...) + __properties = ["feedback_title", "feedback_description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateFeedbackParam: + """Create an instance of UpdateFeedbackParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateFeedbackParam: + """Create an instance of UpdateFeedbackParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateFeedbackParam.parse_obj(obj) + + _obj = UpdateFeedbackParam.parse_obj({ + "feedback_title": obj.get("feedback_title"), + "feedback_description": obj.get("feedback_description") + }) + return _obj + + diff --git a/test/communication/models/update_feedback_status_param.py b/test/communication/models/update_feedback_status_param.py new file mode 100644 index 0000000..9b0e513 --- /dev/null +++ b/test/communication/models/update_feedback_status_param.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt + +class UpdateFeedbackStatusParam(BaseModel): + """ + UpdateFeedbackStatusParam + """ + status: StrictInt = Field(...) + __properties = ["status"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateFeedbackStatusParam: + """Create an instance of UpdateFeedbackStatusParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateFeedbackStatusParam: + """Create an instance of UpdateFeedbackStatusParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateFeedbackStatusParam.parse_obj(obj) + + _obj = UpdateFeedbackStatusParam.parse_obj({ + "status": obj.get("status") + }) + return _obj + + diff --git a/test/communication/models/user.py b/test/communication/models/user.py new file mode 100644 index 0000000..630655f --- /dev/null +++ b/test/communication/models/user.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class User(BaseModel): + """ + User + """ + user_id: StrictStr = Field(...) + __properties = ["user_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> User: + """Create an instance of User from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> User: + """Create an instance of User from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return User.parse_obj(obj) + + _obj = User.parse_obj({ + "user_id": obj.get("user_id") + }) + return _obj + + diff --git a/test/communication/models/users.py b/test/communication/models/users.py new file mode 100644 index 0000000..388a869 --- /dev/null +++ b/test/communication/models/users.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.communication.models.user import User +from typing_extensions import Annotated + +class Users(BaseModel): + """ + Users + """ + users: Annotated[List[User], Field()] = Field(...) + __properties = ["users"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Users: + """Create an instance of Users from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Users: + """Create an instance of Users from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Users.parse_obj(obj) + + _obj = Users.parse_obj({ + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/test/communication/models/votes.py b/test/communication/models/votes.py new file mode 100644 index 0000000..16b60bc --- /dev/null +++ b/test/communication/models/votes.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictInt +from saasus_sdk_python.src.communication.models.user import User +from typing_extensions import Annotated + +class Votes(BaseModel): + """ + Votes + """ + users: Annotated[List[User], Field()] = Field(...) + count: StrictInt = Field(...) + __properties = ["users", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Votes: + """Create an instance of Votes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Votes: + """Create an instance of Votes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Votes.parse_obj(obj) + + _obj = Votes.parse_obj({ + "users": [User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None, + "count": obj.get("count") + }) + return _obj + + diff --git a/test/communication/py.typed b/test/communication/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/communication/rest.py b/test/communication/rest.py new file mode 100644 index 0000000..0812066 --- /dev/null +++ b/test/communication/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Communication API Schema + + SaaSus Communication API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.communication.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/test/integration/__init__.py b/test/integration/__init__.py new file mode 100644 index 0000000..37c110e --- /dev/null +++ b/test/integration/__init__.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.integration.api.error_api import ErrorApi +from saasus_sdk_python.src.integration.api.event_bridge_api import EventBridgeApi + +# import ApiClient +from saasus_sdk_python.src.integration.api_response import ApiResponse +from saasus_sdk_python.src.integration.api_client import ApiClient +from saasus_sdk_python.src.integration.configuration import Configuration +from saasus_sdk_python.src.integration.exceptions import OpenApiException +from saasus_sdk_python.src.integration.exceptions import ApiTypeError +from saasus_sdk_python.src.integration.exceptions import ApiValueError +from saasus_sdk_python.src.integration.exceptions import ApiKeyError +from saasus_sdk_python.src.integration.exceptions import ApiAttributeError +from saasus_sdk_python.src.integration.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.integration.models.aws_region import AwsRegion +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.models.error import Error +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.models.event_message import EventMessage diff --git a/test/integration/api/__init__.py b/test/integration/api/__init__.py new file mode 100644 index 0000000..f8d8973 --- /dev/null +++ b/test/integration/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.integration.api.error_api import ErrorApi +from saasus_sdk_python.src.integration.api.event_bridge_api import EventBridgeApi + diff --git a/test/integration/api/error_api.py b/test/integration/api/error_api.py new file mode 100644 index 0000000..cda9f6f --- /dev/null +++ b/test/integration/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.integration.api_client import ApiClient +from saasus_sdk_python.src.integration.api_response import ApiResponse +from saasus_sdk_python.src.integration.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/integration/api/event_bridge_api.py b/test/integration/api/event_bridge_api.py new file mode 100644 index 0000000..e15b120 --- /dev/null +++ b/test/integration/api/event_bridge_api.py @@ -0,0 +1,723 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from typing import Optional + +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings + +from saasus_sdk_python.src.integration.api_client import ApiClient +from saasus_sdk_python.src.integration.api_response import ApiResponse +from saasus_sdk_python.src.integration.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EventBridgeApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_event_bridge_event(self, create_event_bridge_event_param : Optional[CreateEventBridgeEventParam] = None, **kwargs) -> None: # noqa: E501 + """Send Events # noqa: E501 + + Send events to Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_event(create_event_bridge_event_param, async_req=True) + >>> result = thread.get() + + :param create_event_bridge_event_param: + :type create_event_bridge_event_param: CreateEventBridgeEventParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_event_bridge_event_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_event_bridge_event_with_http_info(create_event_bridge_event_param, **kwargs) # noqa: E501 + + @validate_arguments + def create_event_bridge_event_with_http_info(self, create_event_bridge_event_param : Optional[CreateEventBridgeEventParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Send Events # noqa: E501 + + Send events to Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_event_with_http_info(create_event_bridge_event_param, async_req=True) + >>> result = thread.get() + + :param create_event_bridge_event_param: + :type create_event_bridge_event_param: CreateEventBridgeEventParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'create_event_bridge_event_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_event_bridge_event" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['create_event_bridge_event_param'] is not None: + _body_params = _params['create_event_bridge_event_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/event', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def create_event_bridge_test_event(self, **kwargs) -> None: # noqa: E501 + """Test EventBridge Connection # noqa: E501 + + Send events to test the connection with Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_test_event(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_event_bridge_test_event_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_event_bridge_test_event_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def create_event_bridge_test_event_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Test EventBridge Connection # noqa: E501 + + Send events to test the connection with Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_event_bridge_test_event_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_event_bridge_test_event" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/test-event', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_event_bridge_settings(self, **kwargs) -> None: # noqa: E501 + """Delete EventBridge Settings # noqa: E501 + + Delete settings used to provide host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_event_bridge_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_event_bridge_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_event_bridge_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_event_bridge_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete EventBridge Settings # noqa: E501 + + Delete settings used to provide host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_event_bridge_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_event_bridge_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/info', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_event_bridge_settings(self, **kwargs) -> EventBridgeSettings: # noqa: E501 + """Get EventBridge Settings # noqa: E501 + + Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_event_bridge_settings(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: EventBridgeSettings + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_event_bridge_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_event_bridge_settings_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_event_bridge_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get EventBridge Settings # noqa: E501 + + Gets the settings for providing real-time status of all monitored hosts via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_event_bridge_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(EventBridgeSettings, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_event_bridge_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "EventBridgeSettings", + '500': "Error", + } + + return self.api_client.call_api( + '/eventbridge/info', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def save_event_bridge_settings(self, body : Optional[EventBridgeSettings] = None, **kwargs) -> None: # noqa: E501 + """Update EventBridge Settings # noqa: E501 + + Update configuration used to provide the host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_event_bridge_settings(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: EventBridgeSettings + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the save_event_bridge_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.save_event_bridge_settings_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def save_event_bridge_settings_with_http_info(self, body : Optional[EventBridgeSettings] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update EventBridge Settings # noqa: E501 + + Update configuration used to provide the host state via Amazon EventBridge. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.save_event_bridge_settings_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: EventBridgeSettings + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method save_event_bridge_settings" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/eventbridge/info', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/integration/api_client.py b/test/integration/api_client.py new file mode 100644 index 0000000..4206c38 --- /dev/null +++ b/test/integration/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.integration.configuration import Configuration +from saasus_sdk_python.src.integration.api_response import ApiResponse +import saasus_sdk_python.src.integration.models +from saasus_sdk_python.src.integration import rest +from saasus_sdk_python.src.integration.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.integration.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/integration/api_response.py b/test/integration/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/integration/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/integration/configuration.py b/test/integration/configuration.py new file mode 100644 index 0000000..16008f7 --- /dev/null +++ b/test/integration/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.integration.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/integration" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.integration") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/integration", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/integration/exceptions.py b/test/integration/exceptions.py new file mode 100644 index 0000000..aa9fde7 --- /dev/null +++ b/test/integration/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/integration/models/__init__.py b/test/integration/models/__init__.py new file mode 100644 index 0000000..d55a2f5 --- /dev/null +++ b/test/integration/models/__init__.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.integration.models.aws_region import AwsRegion +from saasus_sdk_python.src.integration.models.create_event_bridge_event_param import CreateEventBridgeEventParam +from saasus_sdk_python.src.integration.models.error import Error +from saasus_sdk_python.src.integration.models.event_bridge_settings import EventBridgeSettings +from saasus_sdk_python.src.integration.models.event_message import EventMessage diff --git a/test/integration/models/aws_region.py b/test/integration/models/aws_region.py new file mode 100644 index 0000000..e3cb16b --- /dev/null +++ b/test/integration/models/aws_region.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class AwsRegion(str, Enum): + """ + All AWS regions except Ningxia and Beijing in China can be selected. + """ + + """ + allowed enum values + """ + US_MINUS_EAST_MINUS_1 = 'us-east-1' + US_MINUS_EAST_MINUS_2 = 'us-east-2' + US_MINUS_WEST_MINUS_1 = 'us-west-1' + US_MINUS_WEST_MINUS_2 = 'us-west-2' + AF_MINUS_SOUTH_MINUS_1 = 'af-south-1' + AP_MINUS_EAST_MINUS_1 = 'ap-east-1' + AP_MINUS_SOUTH_MINUS_1 = 'ap-south-1' + AP_MINUS_NORTHEAST_MINUS_1 = 'ap-northeast-1' + AP_MINUS_NORTHEAST_MINUS_2 = 'ap-northeast-2' + AP_MINUS_NORTHEAST_MINUS_3 = 'ap-northeast-3' + AP_MINUS_SOUTHEAST_MINUS_1 = 'ap-southeast-1' + AP_MINUS_SOUTHEAST_MINUS_2 = 'ap-southeast-2' + AP_MINUS_SOUTHEAST_MINUS_3 = 'ap-southeast-3' + CA_MINUS_CENTRAL_MINUS_1 = 'ca-central-1' + EU_MINUS_CENTRAL_MINUS_1 = 'eu-central-1' + EU_MINUS_NORTH_MINUS_1 = 'eu-north-1' + EU_MINUS_SOUTH_MINUS_1 = 'eu-south-1' + EU_MINUS_WEST_MINUS_1 = 'eu-west-1' + EU_MINUS_WEST_MINUS_2 = 'eu-west-2' + EU_MINUS_WEST_MINUS_3 = 'eu-west-3' + ME_MINUS_SOUTH_MINUS_1 = 'me-south-1' + SA_MINUS_EAST_MINUS_1 = 'sa-east-1' + + @classmethod + def from_json(cls, json_str: str) -> AwsRegion: + """Create an instance of AwsRegion from a JSON string""" + return AwsRegion(json.loads(json_str)) + + diff --git a/test/integration/models/create_event_bridge_event_param.py b/test/integration/models/create_event_bridge_event_param.py new file mode 100644 index 0000000..9bedf93 --- /dev/null +++ b/test/integration/models/create_event_bridge_event_param.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.integration.models.event_message import EventMessage +from typing_extensions import Annotated + +class CreateEventBridgeEventParam(BaseModel): + """ + CreateEventBridgeEventParam + """ + event_messages: Annotated[List[EventMessage], Field()] = Field(..., description="event message") + __properties = ["event_messages"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> CreateEventBridgeEventParam: + """Create an instance of CreateEventBridgeEventParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in event_messages (list) + _items = [] + if self.event_messages: + for _item in self.event_messages: + if _item: + _items.append(_item.to_dict()) + _dict['event_messages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> CreateEventBridgeEventParam: + """Create an instance of CreateEventBridgeEventParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return CreateEventBridgeEventParam.parse_obj(obj) + + _obj = CreateEventBridgeEventParam.parse_obj({ + "event_messages": [EventMessage.from_dict(_item) for _item in obj.get("event_messages")] if obj.get("event_messages") is not None else None + }) + return _obj + + diff --git a/test/integration/models/error.py b/test/integration/models/error.py new file mode 100644 index 0000000..eac824c --- /dev/null +++ b/test/integration/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="permission_denied") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/integration/models/event_bridge_settings.py b/test/integration/models/event_bridge_settings.py new file mode 100644 index 0000000..4de9811 --- /dev/null +++ b/test/integration/models/event_bridge_settings.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.integration.models.aws_region import AwsRegion + +class EventBridgeSettings(BaseModel): + """ + EventBridgeSettings + """ + aws_account_id: StrictStr = Field(..., description="AWS Account ID") + aws_region: AwsRegion = Field(...) + __properties = ["aws_account_id", "aws_region"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> EventBridgeSettings: + """Create an instance of EventBridgeSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> EventBridgeSettings: + """Create an instance of EventBridgeSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return EventBridgeSettings.parse_obj(obj) + + _obj = EventBridgeSettings.parse_obj({ + "aws_account_id": obj.get("aws_account_id"), + "aws_region": obj.get("aws_region") + }) + return _obj + + diff --git a/test/integration/models/event_message.py b/test/integration/models/event_message.py new file mode 100644 index 0000000..27bf30d --- /dev/null +++ b/test/integration/models/event_message.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class EventMessage(BaseModel): + """ + EventMessage + """ + event_type: StrictStr = Field(..., description="event type") + event_detail_type: StrictStr = Field(..., description="detailed event type") + message: StrictStr = Field(..., description="event message") + __properties = ["event_type", "event_detail_type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> EventMessage: + """Create an instance of EventMessage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> EventMessage: + """Create an instance of EventMessage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return EventMessage.parse_obj(obj) + + _obj = EventMessage.parse_obj({ + "event_type": obj.get("event_type"), + "event_detail_type": obj.get("event_detail_type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/integration/py.typed b/test/integration/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/integration/rest.py b/test/integration/rest.py new file mode 100644 index 0000000..3361edd --- /dev/null +++ b/test/integration/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Eventbridge API Schema + + SaaSus Eventbridge API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.integration.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/test/pricing/__init__.py b/test/pricing/__init__.py new file mode 100644 index 0000000..8b225a9 --- /dev/null +++ b/test/pricing/__init__.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +# flake8: noqa + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from saasus_sdk_python.src.pricing.api.error_api import ErrorApi +from saasus_sdk_python.src.pricing.api.metering_api import MeteringApi +from saasus_sdk_python.src.pricing.api.pricing_menus_api import PricingMenusApi +from saasus_sdk_python.src.pricing.api.pricing_plans_api import PricingPlansApi +from saasus_sdk_python.src.pricing.api.pricing_units_api import PricingUnitsApi +from saasus_sdk_python.src.pricing.api.tax_rate_api import TaxRateApi + +# import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.configuration import Configuration +from saasus_sdk_python.src.pricing.exceptions import OpenApiException +from saasus_sdk_python.src.pricing.exceptions import ApiTypeError +from saasus_sdk_python.src.pricing.exceptions import ApiValueError +from saasus_sdk_python.src.pricing.exceptions import ApiKeyError +from saasus_sdk_python.src.pricing.exceptions import ApiAttributeError +from saasus_sdk_python.src.pricing.exceptions import ApiException + +# import models into sdk package +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.error import Error +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam diff --git a/test/pricing/api/__init__.py b/test/pricing/api/__init__.py new file mode 100644 index 0000000..546a6f4 --- /dev/null +++ b/test/pricing/api/__init__.py @@ -0,0 +1,10 @@ +# flake8: noqa + +# import apis into api package +from saasus_sdk_python.src.pricing.api.error_api import ErrorApi +from saasus_sdk_python.src.pricing.api.metering_api import MeteringApi +from saasus_sdk_python.src.pricing.api.pricing_menus_api import PricingMenusApi +from saasus_sdk_python.src.pricing.api.pricing_plans_api import PricingPlansApi +from saasus_sdk_python.src.pricing.api.pricing_units_api import PricingUnitsApi +from saasus_sdk_python.src.pricing.api.tax_rate_api import TaxRateApi + diff --git a/test/pricing/api/error_api.py b/test/pricing/api/error_api.py new file mode 100644 index 0000000..3aabbb0 --- /dev/null +++ b/test/pricing/api/error_api.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ErrorApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def return_internal_server_error(self, **kwargs) -> None: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the return_internal_server_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.return_internal_server_error_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def return_internal_server_error_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Return Internal Server Error # noqa: E501 + + This endpoint is used for testing purposes. Returns a server error with status code 500. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.return_internal_server_error_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method return_internal_server_error" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/errors/internal-server-error', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/pricing/api/metering_api.py b/test/pricing/api/metering_api.py new file mode 100644 index 0000000..f189dfb --- /dev/null +++ b/test/pricing/api/metering_api.py @@ -0,0 +1,2180 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MeteringApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_metering_unit(self, body : Optional[MeteringUnitProps] = None, **kwargs) -> MeteringUnit: # noqa: E501 + """Create Metering Unit # noqa: E501 + + Create a metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_metering_unit(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnit + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_metering_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_metering_unit_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_metering_unit_with_http_info(self, body : Optional[MeteringUnitProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Metering Unit # noqa: E501 + + Create a metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_metering_unit_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnit, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_metering_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "MeteringUnit", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/units', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_metering_unit_by_id(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], **kwargs) -> None: # noqa: E501 + """Delete Metering Unit # noqa: E501 + + Delete metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_by_id(metering_unit_id, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_metering_unit_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_metering_unit_by_id_with_http_info(metering_unit_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_metering_unit_by_id_with_http_info(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Metering Unit # noqa: E501 + + Delete metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_by_id_with_http_info(metering_unit_id, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'metering_unit_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_metering_unit_by_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['metering_unit_id']: + _path_params['metering_unit_id'] = _params['metering_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/metering/units/{metering_unit_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_metering_unit_timestamp_count(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], **kwargs) -> None: # noqa: E501 + """Delete Metering Unit Count for Specified Timestamp # noqa: E501 + + Deletes metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_metering_unit_timestamp_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, **kwargs) # noqa: E501 + + @validate_arguments + def delete_metering_unit_timestamp_count_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Metering Unit Count for Specified Timestamp # noqa: E501 + + Deletes metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'timestamp' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_metering_unit_timestamp_count" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['timestamp']: + _path_params['timestamp'] = _params['timestamp'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> MeteringUnitDateCount: # noqa: E501 + """Get Metering Unit Count for Specific Date # noqa: E501 + + Gets the metering unit count for a specific date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date(tenant_id, metering_unit_name, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDateCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info(tenant_id, metering_unit_name, var_date, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Metering Unit Count for Specific Date # noqa: E501 + + Gets the metering unit count for a specific date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_with_http_info(tenant_id, metering_unit_name, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDateCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'var_date' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['var_date']: + _path_params['date'] = _params['var_date'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDateCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/date/{date}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], start_timestamp : Annotated[Optional[StrictInt], Field(description="Start Date-Time")] = None, end_timestamp : Annotated[Optional[StrictInt], Field(description="End Date-Time")] = None, **kwargs) -> MeteringUnitDatePeriodCounts: # noqa: E501 + """Obtain metering unit counts for a specified date/time period # noqa: E501 + + Obtain metering unit counts for a specified date/time period. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period(tenant_id, metering_unit_name, start_timestamp, end_timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param start_timestamp: Start Date-Time + :type start_timestamp: int + :param end_timestamp: End Date-Time + :type end_timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDatePeriodCounts + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info(tenant_id, metering_unit_name, start_timestamp, end_timestamp, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], start_timestamp : Annotated[Optional[StrictInt], Field(description="Start Date-Time")] = None, end_timestamp : Annotated[Optional[StrictInt], Field(description="End Date-Time")] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Obtain metering unit counts for a specified date/time period # noqa: E501 + + Obtain metering unit counts for a specified date/time period. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period_with_http_info(tenant_id, metering_unit_name, start_timestamp, end_timestamp, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param start_timestamp: Start Date-Time + :type start_timestamp: int + :param end_timestamp: End Date-Time + :type end_timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDatePeriodCounts, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'start_timestamp', + 'end_timestamp' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_count_by_tenant_id_and_unit_name_and_date_period" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + if _params.get('start_timestamp') is not None: # noqa: E501 + _query_params.append(('start_timestamp', _params['start_timestamp'])) + + if _params.get('end_timestamp') is not None: # noqa: E501 + _query_params.append(('end_timestamp', _params['end_timestamp'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDatePeriodCounts", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/date-period', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_today(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> MeteringUnitDateCount: # noqa: E501 + """Get Metering Unit Count for the Current Day # noqa: E501 + + Get the metering unit count for the current day. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_today(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDateCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info(tenant_id, metering_unit_name, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Metering Unit Count for the Current Day # noqa: E501 + + Get the metering unit count for the current day. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_count_by_tenant_id_and_unit_name_today_with_http_info(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDateCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_count_by_tenant_id_and_unit_name_today" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDateCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/today', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_date_counts_by_tenant_id_and_date(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> MeteringUnitDateCounts: # noqa: E501 + """Get All Metering Unit Counts for a Specified Date # noqa: E501 + + Gets the total metering unit count for the specified date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_counts_by_tenant_id_and_date(tenant_id, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitDateCounts + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info(tenant_id, var_date, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], var_date : Annotated[StrictStr, Field(..., description="Date")], **kwargs) -> ApiResponse: # noqa: E501 + """Get All Metering Unit Counts for a Specified Date # noqa: E501 + + Gets the total metering unit count for the specified date. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_date_counts_by_tenant_id_and_date_with_http_info(tenant_id, var_date, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param var_date: Date (required) + :type var_date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitDateCounts, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'var_date' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_date_counts_by_tenant_id_and_date" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['var_date']: + _path_params['date'] = _params['var_date'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitDateCounts", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/date/{date}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> MeteringUnitMonthCount: # noqa: E501 + """Get the Metering Unit Count for the Specified Month # noqa: E501 + + Gets the metering unit count for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month(tenant_id, metering_unit_name, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitMonthCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info(tenant_id, metering_unit_name, month, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> ApiResponse: # noqa: E501 + """Get the Metering Unit Count for the Specified Month # noqa: E501 + + Gets the metering unit count for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month_with_http_info(tenant_id, metering_unit_name, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitMonthCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'month' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_month_count_by_tenant_id_and_unit_name_and_month" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['month']: + _path_params['month'] = _params['month'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitMonthCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/month/{month}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> MeteringUnitMonthCount: # noqa: E501 + """Get Metering Unit Count for the Current Month # noqa: E501 + + Get the metering unit count for the current month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitMonthCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info(tenant_id, metering_unit_name, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Metering Unit Count for the Current Month # noqa: E501 + + Get the metering unit count for the current month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month_with_http_info(tenant_id, metering_unit_name, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitMonthCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_month_count_by_tenant_id_and_unit_name_this_month" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitMonthCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/thismonth', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_unit_month_counts_by_tenant_id_and_month(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> MeteringUnitMonthCounts: # noqa: E501 + """Get All Metering Unit Counts for the Specified Month # noqa: E501 + + Gets all metering unit counts for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_counts_by_tenant_id_and_month(tenant_id, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitMonthCounts + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info(tenant_id, month, **kwargs) # noqa: E501 + + @validate_arguments + def get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], month : Annotated[StrictStr, Field(..., description="Month")], **kwargs) -> ApiResponse: # noqa: E501 + """Get All Metering Unit Counts for the Specified Month # noqa: E501 + + Gets all metering unit counts for the specified month. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_unit_month_counts_by_tenant_id_and_month_with_http_info(tenant_id, month, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param month: Month (required) + :type month: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitMonthCounts, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'month' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_unit_month_counts_by_tenant_id_and_month" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['month']: + _path_params['month'] = _params['month'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitMonthCounts", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/month/{month}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_metering_units(self, **kwargs) -> MeteringUnits: # noqa: E501 + """Get all metering units # noqa: E501 + + Get all metering units. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_units(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnits + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_metering_units_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_metering_units_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_metering_units_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get all metering units # noqa: E501 + + Get all metering units. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_metering_units_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnits, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_metering_units" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnits", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/units', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_metering_unit_by_id(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], body : Optional[MeteringUnitProps] = None, **kwargs) -> None: # noqa: E501 + """Update Metering Unit # noqa: E501 + + Update metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_by_id(metering_unit_id, body, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_metering_unit_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_metering_unit_by_id_with_http_info(metering_unit_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_metering_unit_by_id_with_http_info(self, metering_unit_id : Annotated[StrictStr, Field(..., description="Metering Unit ID")], body : Optional[MeteringUnitProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Metering Unit # noqa: E501 + + Update metering unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_by_id_with_http_info(metering_unit_id, body, async_req=True) + >>> result = thread.get() + + :param metering_unit_id: Metering Unit ID (required) + :type metering_unit_id: str + :param body: + :type body: MeteringUnitProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'metering_unit_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_metering_unit_by_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['metering_unit_id']: + _path_params['metering_unit_id'] = _params['metering_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/metering/units/{metering_unit_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_metering_unit_timestamp_count(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], update_metering_unit_timestamp_count_param : Optional[UpdateMeteringUnitTimestampCountParam] = None, **kwargs) -> MeteringUnitTimestampCount: # noqa: E501 + """Update Metering Unit Count for Specified Timestamp # noqa: E501 + + Update metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param update_metering_unit_timestamp_count_param: + :type update_metering_unit_timestamp_count_param: UpdateMeteringUnitTimestampCountParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitTimestampCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_metering_unit_timestamp_count_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_metering_unit_timestamp_count_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], timestamp : Annotated[StrictInt, Field(..., description="Timestamp")], update_metering_unit_timestamp_count_param : Optional[UpdateMeteringUnitTimestampCountParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Metering Unit Count for Specified Timestamp # noqa: E501 + + Update metering unit count for the specified timestamp. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count_with_http_info(tenant_id, metering_unit_name, timestamp, update_metering_unit_timestamp_count_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param timestamp: Timestamp (required) + :type timestamp: int + :param update_metering_unit_timestamp_count_param: + :type update_metering_unit_timestamp_count_param: UpdateMeteringUnitTimestampCountParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitTimestampCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'timestamp', + 'update_metering_unit_timestamp_count_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_metering_unit_timestamp_count" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + if _params['timestamp']: + _path_params['timestamp'] = _params['timestamp'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_metering_unit_timestamp_count_param'] is not None: + _body_params = _params['update_metering_unit_timestamp_count_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitTimestampCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/timestamp/{timestamp}', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_metering_unit_timestamp_count_now(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], update_metering_unit_timestamp_count_now_param : Optional[UpdateMeteringUnitTimestampCountNowParam] = None, **kwargs) -> MeteringUnitTimestampCount: # noqa: E501 + """Update Metering Unit Count for Current Time # noqa: E501 + + Update the metering unit count for the current time. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count_now(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param update_metering_unit_timestamp_count_now_param: + :type update_metering_unit_timestamp_count_now_param: UpdateMeteringUnitTimestampCountNowParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MeteringUnitTimestampCount + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_metering_unit_timestamp_count_now_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_metering_unit_timestamp_count_now_with_http_info(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_metering_unit_timestamp_count_now_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], metering_unit_name : Annotated[StrictStr, Field(..., description="Metering Unit Name")], update_metering_unit_timestamp_count_now_param : Optional[UpdateMeteringUnitTimestampCountNowParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Metering Unit Count for Current Time # noqa: E501 + + Update the metering unit count for the current time. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_metering_unit_timestamp_count_now_with_http_info(tenant_id, metering_unit_name, update_metering_unit_timestamp_count_now_param, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param metering_unit_name: Metering Unit Name (required) + :type metering_unit_name: str + :param update_metering_unit_timestamp_count_now_param: + :type update_metering_unit_timestamp_count_now_param: UpdateMeteringUnitTimestampCountNowParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MeteringUnitTimestampCount, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id', + 'metering_unit_name', + 'update_metering_unit_timestamp_count_now_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_metering_unit_timestamp_count_now" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + if _params['metering_unit_name']: + _path_params['metering_unit_name'] = _params['metering_unit_name'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_metering_unit_timestamp_count_now_param'] is not None: + _body_params = _params['update_metering_unit_timestamp_count_now_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "MeteringUnitTimestampCount", + '500': "Error", + } + + return self.api_client.call_api( + '/metering/tenants/{tenant_id}/units/{metering_unit_name}/now', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/pricing/api/pricing_menus_api.py b/test/pricing/api/pricing_menus_api.py new file mode 100644 index 0000000..7c23481 --- /dev/null +++ b/test/pricing/api/pricing_menus_api.py @@ -0,0 +1,756 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PricingMenusApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_pricing_menu(self, body : Optional[SavePricingMenuParam] = None, **kwargs) -> PricingMenu: # noqa: E501 + """Create a Pricing Feature Menu # noqa: E501 + + Create a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_menu(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingMenu + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_pricing_menu_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_pricing_menu_with_http_info(self, body : Optional[SavePricingMenuParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create a Pricing Feature Menu # noqa: E501 + + Create a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_menu_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingMenu, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "PricingMenu", + '500': "Error", + } + + return self.api_client.call_api( + '/menus', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_pricing_menu(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> None: # noqa: E501 + """Delete Pricing Feature Menu # noqa: E501 + + Delete pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_menu(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_pricing_menu_with_http_info(menu_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_pricing_menu_with_http_info(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Pricing Feature Menu # noqa: E501 + + Delete pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_menu_with_http_info(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'menu_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['menu_id']: + _path_params['menu_id'] = _params['menu_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/menus/{menu_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_menu(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> PricingMenu: # noqa: E501 + """Get Pricing Feature Menu # noqa: E501 + + Get a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menu(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingMenu + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_menu_with_http_info(menu_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_menu_with_http_info(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Feature Menu # noqa: E501 + + Get a pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menu_with_http_info(menu_id, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingMenu, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'menu_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['menu_id']: + _path_params['menu_id'] = _params['menu_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingMenu", + '500': "Error", + } + + return self.api_client.call_api( + '/menus/{menu_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_menus(self, **kwargs) -> PricingMenus: # noqa: E501 + """Get Pricing Feature Menus # noqa: E501 + + Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menus(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingMenus + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_menus_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_menus_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_menus_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Feature Menus # noqa: E501 + + Get the feature menu list. Multiple measurement units are grouped together and defined as one feature menu. Multiple feature menus defined here are combined into one billing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_menus_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingMenus, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_menus" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingMenus", + '500': "Error", + } + + return self.api_client.call_api( + '/menus', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_menu(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], body : Optional[SavePricingMenuParam] = None, **kwargs) -> None: # noqa: E501 + """Update Pricing Feature Menu # noqa: E501 + + Update pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_menu(menu_id, body, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_menu_with_http_info(menu_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_menu_with_http_info(self, menu_id : Annotated[StrictStr, Field(..., description="Menu ID")], body : Optional[SavePricingMenuParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Pricing Feature Menu # noqa: E501 + + Update pricing feature menu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_menu_with_http_info(menu_id, body, async_req=True) + >>> result = thread.get() + + :param menu_id: Menu ID (required) + :type menu_id: str + :param body: + :type body: SavePricingMenuParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'menu_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_menu" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['menu_id']: + _path_params['menu_id'] = _params['menu_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/menus/{menu_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/pricing/api/pricing_plans_api.py b/test/pricing/api/pricing_plans_api.py new file mode 100644 index 0000000..a413950 --- /dev/null +++ b/test/pricing/api/pricing_plans_api.py @@ -0,0 +1,1288 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PricingPlansApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_pricing_plan(self, body : Optional[SavePricingPlanParam] = None, **kwargs) -> PricingPlan: # noqa: E501 + """Create Pricing Plan # noqa: E501 + + Create a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_plan(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingPlan + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_pricing_plan_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_pricing_plan_with_http_info(self, body : Optional[SavePricingPlanParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Pricing Plan # noqa: E501 + + Create a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_plan_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingPlan, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "PricingPlan", + '500': "Error", + } + + return self.api_client.call_api( + '/plans', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_all_plans_and_menus_and_units_and_meters_and_tax_rates(self, **kwargs) -> None: # noqa: E501 + """Delete all Plans, Menus, Units, Meters and Tax Rates # noqa: E501 + + Unconditionally remove all rate plans, menus, units, meters and tax rates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete all Plans, Menus, Units, Meters and Tax Rates # noqa: E501 + + Unconditionally remove all rate plans, menus, units, meters and tax rates. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_all_plans_and_menus_and_units_and_meters_and_tax_rates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_plans_and_menus_and_units_and_meters_and_tax_rates" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans-initialization', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_pricing_plan(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> None: # noqa: E501 + """Delete Pricing Plan # noqa: E501 + + Delete a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_plan(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_pricing_plan_with_http_info(plan_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_pricing_plan_with_http_info(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Pricing Plan # noqa: E501 + + Delete a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_plan_with_http_info(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'plan_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_id']: + _path_params['plan_id'] = _params['plan_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/{plan_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_stripe_plan(self, **kwargs) -> None: # noqa: E501 + """Delete Product Data from Stripe # noqa: E501 + + Delete product data from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_plan(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_stripe_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_stripe_plan_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def delete_stripe_plan_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Delete Product Data from Stripe # noqa: E501 + + Delete product data from Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_stripe_plan_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_stripe_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_plan(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> PricingPlan: # noqa: E501 + """Get Pricing Plan # noqa: E501 + + Get a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plan(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingPlan + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_plan_with_http_info(plan_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_plan_with_http_info(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Plan # noqa: E501 + + Get a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plan_with_http_info(plan_id, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingPlan, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'plan_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_id']: + _path_params['plan_id'] = _params['plan_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingPlan", + '500': "Error", + } + + return self.api_client.call_api( + '/plans/{plan_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_plans(self, **kwargs) -> PricingPlans: # noqa: E501 + """Get Pricing Plans # noqa: E501 + + Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plans(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingPlans + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_plans_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_plans_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_plans_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Plans # noqa: E501 + + Get pricing plans. Multiple feature menus are grouped together and defined as one pricing plan. Each tenant can choose a pricing plan defined here. If you have a specific tenant-specific rate (private pricing), create and connect the pricing plan specifically for that tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingPlans, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_plans" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingPlans", + '500': "Error", + } + + return self.api_client.call_api( + '/plans', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def link_plan_to_stripe(self, **kwargs) -> None: # noqa: E501 + """Connect to Stripe # noqa: E501 + + Connect information to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_plan_to_stripe(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the link_plan_to_stripe_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.link_plan_to_stripe_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def link_plan_to_stripe_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Connect to Stripe # noqa: E501 + + Connect information to Stripe. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_plan_to_stripe_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method link_plan_to_stripe" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/stripe/init', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_plan(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], body : Optional[SavePricingPlanParam] = None, **kwargs) -> None: # noqa: E501 + """Update Pricing Plan # noqa: E501 + + Update a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plan(plan_id, body, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_plan_with_http_info(plan_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_plan_with_http_info(self, plan_id : Annotated[StrictStr, Field(..., description="Pricing Plan ID")], body : Optional[SavePricingPlanParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Pricing Plan # noqa: E501 + + Update a pricing plan. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plan_with_http_info(plan_id, body, async_req=True) + >>> result = thread.get() + + :param plan_id: Pricing Plan ID (required) + :type plan_id: str + :param body: + :type body: SavePricingPlanParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'plan_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_plan" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['plan_id']: + _path_params['plan_id'] = _params['plan_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/{plan_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_plans_used(self, update_pricing_plans_used_param : Optional[UpdatePricingPlansUsedParam] = None, **kwargs) -> None: # noqa: E501 + """Update Used Flag # noqa: E501 + + Update price plan and feature menu/pricing unit to used. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plans_used(update_pricing_plans_used_param, async_req=True) + >>> result = thread.get() + + :param update_pricing_plans_used_param: + :type update_pricing_plans_used_param: UpdatePricingPlansUsedParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_plans_used_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_plans_used_with_http_info(update_pricing_plans_used_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_plans_used_with_http_info(self, update_pricing_plans_used_param : Optional[UpdatePricingPlansUsedParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Used Flag # noqa: E501 + + Update price plan and feature menu/pricing unit to used. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_plans_used_with_http_info(update_pricing_plans_used_param, async_req=True) + >>> result = thread.get() + + :param update_pricing_plans_used_param: + :type update_pricing_plans_used_param: UpdatePricingPlansUsedParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'update_pricing_plans_used_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_plans_used" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_pricing_plans_used_param'] is not None: + _body_params = _params['update_pricing_plans_used_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/plans/used', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/pricing/api/pricing_units_api.py b/test/pricing/api/pricing_units_api.py new file mode 100644 index 0000000..37252f9 --- /dev/null +++ b/test/pricing/api/pricing_units_api.py @@ -0,0 +1,756 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PricingUnitsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_pricing_unit(self, body : Optional[PricingUnitForSave] = None, **kwargs) -> PricingUnit: # noqa: E501 + """Create Pricing Unit # noqa: E501 + + Create a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_unit(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingUnit + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_pricing_unit_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_pricing_unit_with_http_info(self, body : Optional[PricingUnitForSave] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Pricing Unit # noqa: E501 + + Create a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_pricing_unit_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingUnit, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "PricingUnit", + '500': "Error", + } + + return self.api_client.call_api( + '/units', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def delete_pricing_unit(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> None: # noqa: E501 + """Delete Pricing Unit # noqa: E501 + + Delete a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_unit(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the delete_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.delete_pricing_unit_with_http_info(pricing_unit_id, **kwargs) # noqa: E501 + + @validate_arguments + def delete_pricing_unit_with_http_info(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Delete Pricing Unit # noqa: E501 + + Delete a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pricing_unit_with_http_info(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'pricing_unit_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['pricing_unit_id']: + _path_params['pricing_unit_id'] = _params['pricing_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/units/{pricing_unit_id}', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_unit(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> PricingUnit: # noqa: E501 + """Get Pricing Unit # noqa: E501 + + Get a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_unit(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingUnit + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_unit_with_http_info(pricing_unit_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_unit_with_http_info(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Unit # noqa: E501 + + Get a pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_unit_with_http_info(pricing_unit_id, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingUnit, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'pricing_unit_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['pricing_unit_id']: + _path_params['pricing_unit_id'] = _params['pricing_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingUnit", + '500': "Error", + } + + return self.api_client.call_api( + '/units/{pricing_unit_id}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_pricing_units(self, **kwargs) -> PricingUnits: # noqa: E501 + """Get Pricing Units # noqa: E501 + + Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_units(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PricingUnits + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_pricing_units_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_pricing_units_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_pricing_units_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Pricing Units # noqa: E501 + + Gets the smallest unit of measure on which the charges are based. \"Fixed Unit\" (type=fixed) is a unit of a monthly fixed charge such as a basic charge, \"Usage Unit\" (type=usage) is a unit in which a charge is generated per unit such as billing for the number of users, \"Tiered Unit\" (type=tiered) is a fixed charge unit for each tier of usage, such as the tiered packet charge for mobile phones, \"Tiered Usage Unit\" (type=tiered_usage) is a unit where the charge per unit changes according to the usage amount, such as a volume discount. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pricing_units_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PricingUnits, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pricing_units" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "PricingUnits", + '500': "Error", + } + + return self.api_client.call_api( + '/units', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_pricing_unit(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], body : Optional[PricingUnitForSave] = None, **kwargs) -> None: # noqa: E501 + """Update Pricing Unit # noqa: E501 + + Update pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_unit(pricing_unit_id, body, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_pricing_unit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_pricing_unit_with_http_info(pricing_unit_id, body, **kwargs) # noqa: E501 + + @validate_arguments + def update_pricing_unit_with_http_info(self, pricing_unit_id : Annotated[StrictStr, Field(..., description="Unit ID")], body : Optional[PricingUnitForSave] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Pricing Unit # noqa: E501 + + Update pricing unit. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_pricing_unit_with_http_info(pricing_unit_id, body, async_req=True) + >>> result = thread.get() + + :param pricing_unit_id: Unit ID (required) + :type pricing_unit_id: str + :param body: + :type body: PricingUnitForSave + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'pricing_unit_id', + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_pricing_unit" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['pricing_unit_id']: + _path_params['pricing_unit_id'] = _params['pricing_unit_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/units/{pricing_unit_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/pricing/api/tax_rate_api.py b/test/pricing/api/tax_rate_api.py new file mode 100644 index 0000000..a6d04a0 --- /dev/null +++ b/test/pricing/api/tax_rate_api.py @@ -0,0 +1,481 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import re # noqa: F401 +import io +import warnings + +from pydantic import validate_arguments, ValidationError +from typing_extensions import Annotated + +from pydantic import Field, StrictStr + +from typing import Optional + +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam + +from saasus_sdk_python.src.pricing.api_client import ApiClient +from saasus_sdk_python.src.pricing.api_response import ApiResponse +from saasus_sdk_python.src.pricing.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TaxRateApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_arguments + def create_tax_rate(self, body : Optional[TaxRateProps] = None, **kwargs) -> TaxRate: # noqa: E501 + """Create Tax Rate # noqa: E501 + + Creates a tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tax_rate(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TaxRateProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TaxRate + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_tax_rate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_tax_rate_with_http_info(body, **kwargs) # noqa: E501 + + @validate_arguments + def create_tax_rate_with_http_info(self, body : Optional[TaxRateProps] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Create Tax Rate # noqa: E501 + + Creates a tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tax_rate_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: + :type body: TaxRateProps + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TaxRate, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'body' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tax_rate" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['body'] is not None: + _body_params = _params['body'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '201': "TaxRate", + '400': "Error", + '500': "Error", + } + + return self.api_client.call_api( + '/tax-rates', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_tax_rates(self, **kwargs) -> TaxRates: # noqa: E501 + """Get Tax Rates # noqa: E501 + + Get all Tax Rates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tax_rates(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: TaxRates + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_tax_rates_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_tax_rates_with_http_info(**kwargs) # noqa: E501 + + @validate_arguments + def get_tax_rates_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + """Get Tax Rates # noqa: E501 + + Get all Tax Rates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tax_rates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TaxRates, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tax_rates" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "TaxRates", + '500': "Error", + } + + return self.api_client.call_api( + '/tax-rates', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def update_tax_rate(self, tax_rate_id : Annotated[StrictStr, Field(..., description="Tax Rate ID")], update_tax_rate_param : Optional[UpdateTaxRateParam] = None, **kwargs) -> None: # noqa: E501 + """Update Tax Rate # noqa: E501 + + Update tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tax_rate(tax_rate_id, update_tax_rate_param, async_req=True) + >>> result = thread.get() + + :param tax_rate_id: Tax Rate ID (required) + :type tax_rate_id: str + :param update_tax_rate_param: + :type update_tax_rate_param: UpdateTaxRateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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 + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the update_tax_rate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.update_tax_rate_with_http_info(tax_rate_id, update_tax_rate_param, **kwargs) # noqa: E501 + + @validate_arguments + def update_tax_rate_with_http_info(self, tax_rate_id : Annotated[StrictStr, Field(..., description="Tax Rate ID")], update_tax_rate_param : Optional[UpdateTaxRateParam] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Update Tax Rate # noqa: E501 + + Update tax rate. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_tax_rate_with_http_info(tax_rate_id, update_tax_rate_param, async_req=True) + >>> result = thread.get() + + :param tax_rate_id: Tax Rate ID (required) + :type tax_rate_id: str + :param update_tax_rate_param: + :type update_tax_rate_param: UpdateTaxRateParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'tax_rate_id', + 'update_tax_rate_param' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_tax_rate" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tax_rate_id']: + _path_params['tax_rate_id'] = _params['tax_rate_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['update_tax_rate_param'] is not None: + _body_params = _params['update_tax_rate_param'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/tax-rates/{tax_rate_id}', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/test/pricing/api_client.py b/test/pricing/api_client.py new file mode 100644 index 0000000..53c85f2 --- /dev/null +++ b/test/pricing/api_client.py @@ -0,0 +1,755 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +from urllib.parse import quote + +from saasus_sdk_python.src.pricing.configuration import Configuration +from saasus_sdk_python.src.pricing.api_response import ApiResponse +import saasus_sdk_python.src.pricing.models +from saasus_sdk_python.src.pricing import rest +from saasus_sdk_python.src.pricing.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, query_params, auth_settings, + resource_path, method, body, + request_auth=_request_auth) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, + collection_formats) + url += "?" + url_query + + try: + # perform request and return response + response_data = self.request( + method, url, + query_params=query_params, + headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + if e.body: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = None # assuming derialization is not needed + # data needs deserialization or returns HTTP data (deserialized) only + if _preload_content or _return_http_data_only: + response_type = response_types_map.get(str(response_data.status), None) + + if response_type == "bytearray": + response_data.data = response_data.data + else: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type == "bytearray": + return_data = response_data.data + elif response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return return_data + else: + return ApiResponse(status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = obj.to_dict() + + return {key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items()} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(saasus_sdk_python.src.pricing.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None, _preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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 + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.get_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.head_request(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.options_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.post_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.put_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.patch_request(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.delete_request(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v))) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(item) for item in new_params]) + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body, + request_auth=None): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params(headers, queries, + resource_path, method, body, + request_auth) + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params(headers, queries, + resource_path, method, body, + auth_setting) + + def _apply_auth_params(self, headers, queries, + resource_path, method, body, + auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test/pricing/api_response.py b/test/pricing/api_response.py new file mode 100644 index 0000000..d81c2ff --- /dev/null +++ b/test/pricing/api_response.py @@ -0,0 +1,25 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Any, Dict, Optional +from pydantic import Field, StrictInt, StrictStr + +class ApiResponse: + """ + API response object + """ + + status_code: Optional[StrictInt] = Field(None, description="HTTP status code") + headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + data: Optional[Any] = Field(None, description="Deserialized data given the data type") + raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") + + def __init__(self, + status_code=None, + headers=None, + data=None, + raw_data=None): + self.status_code = status_code + self.headers = headers + self.data = data + self.raw_data = raw_data diff --git a/test/pricing/configuration.py b/test/pricing/configuration.py new file mode 100644 index 0000000..ba4134c --- /dev/null +++ b/test/pricing/configuration.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import http.client as httplib +from saasus_sdk_python.src.pricing.exceptions import ApiValueError + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://api.saasus.io/v1/pricing" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("saasus_sdk_python.src.pricing") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['Bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.saasus.io/v1/pricing", + 'description': "Production API Server", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test/pricing/exceptions.py b/test/pricing/exceptions.py new file mode 100644 index 0000000..41c7737 --- /dev/null +++ b/test/pricing/exceptions.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + +class BadRequestException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(BadRequestException, self).__init__(status, reason, http_resp) + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test/pricing/models/__init__.py b/test/pricing/models/__init__.py new file mode 100644 index 0000000..063a4e6 --- /dev/null +++ b/test/pricing/models/__init__.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +# flake8: noqa +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.error import Error +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from saasus_sdk_python.src.pricing.models.metering_unit_date_counts import MeteringUnitDateCounts +from saasus_sdk_python.src.pricing.models.metering_unit_date_period_counts import MeteringUnitDatePeriodCounts +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from saasus_sdk_python.src.pricing.models.metering_unit_month_counts import MeteringUnitMonthCounts +from saasus_sdk_python.src.pricing.models.metering_unit_props import MeteringUnitProps +from saasus_sdk_python.src.pricing.models.metering_unit_timestamp_count import MeteringUnitTimestampCount +from saasus_sdk_python.src.pricing.models.metering_units import MeteringUnits +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from saasus_sdk_python.src.pricing.models.pricing_menu_props import PricingMenuProps +from saasus_sdk_python.src.pricing.models.pricing_menus import PricingMenus +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from saasus_sdk_python.src.pricing.models.pricing_plan_props import PricingPlanProps +from saasus_sdk_python.src.pricing.models.pricing_plans import PricingPlans +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiers import PricingTiers +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from saasus_sdk_python.src.pricing.models.pricing_unit_base_props import PricingUnitBaseProps +from saasus_sdk_python.src.pricing.models.pricing_unit_for_save import PricingUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_units import PricingUnits +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.save_pricing_menu_param import SavePricingMenuParam +from saasus_sdk_python.src.pricing.models.save_pricing_plan_param import SavePricingPlanParam +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from saasus_sdk_python.src.pricing.models.tax_rate_props import TaxRateProps +from saasus_sdk_python.src.pricing.models.tax_rates import TaxRates +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_now_param import UpdateMeteringUnitTimestampCountNowParam +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_param import UpdateMeteringUnitTimestampCountParam +from saasus_sdk_python.src.pricing.models.update_pricing_plans_used_param import UpdatePricingPlansUsedParam +from saasus_sdk_python.src.pricing.models.update_tax_rate_param import UpdateTaxRateParam diff --git a/test/pricing/models/aggregate_usage.py b/test/pricing/models/aggregate_usage.py new file mode 100644 index 0000000..48757af --- /dev/null +++ b/test/pricing/models/aggregate_usage.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class AggregateUsage(str, Enum): + """ + Aggregate usage sum: Total usage during the period max: Maximum usage during the period + """ + + """ + allowed enum values + """ + SUM = 'sum' + MAX = 'max' + + @classmethod + def from_json(cls, json_str: str) -> AggregateUsage: + """Create an instance of AggregateUsage from a JSON string""" + return AggregateUsage(json.loads(json_str)) + + diff --git a/test/pricing/models/currency.py b/test/pricing/models/currency.py new file mode 100644 index 0000000..bfdaa33 --- /dev/null +++ b/test/pricing/models/currency.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class Currency(str, Enum): + """ + Unit of currency + """ + + """ + allowed enum values + """ + JPY = 'JPY' + USD = 'USD' + + @classmethod + def from_json(cls, json_str: str) -> Currency: + """Create an instance of Currency from a JSON string""" + return Currency(json.loads(json_str)) + + diff --git a/test/pricing/models/error.py b/test/pricing/models/error.py new file mode 100644 index 0000000..a32910e --- /dev/null +++ b/test/pricing/models/error.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class Error(BaseModel): + """ + Error + """ + type: StrictStr = Field(..., description="Error type") + message: StrictStr = Field(..., description="Error message") + __properties = ["type", "message"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Error: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> Error: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Error.parse_obj(obj) + + _obj = Error.parse_obj({ + "type": obj.get("type"), + "message": obj.get("message") + }) + return _obj + + diff --git a/test/pricing/models/metering_unit.py b/test/pricing/models/metering_unit.py new file mode 100644 index 0000000..45907af --- /dev/null +++ b/test/pricing/models/metering_unit.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage + +class MeteringUnit(BaseModel): + """ + MeteringUnit + """ + unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + display_name: StrictStr = Field(..., description="Display name") + description: StrictStr = Field(..., description="Description") + id: StrictStr = Field(..., description="Universally Unique Identifier") + used: StrictBool = Field(..., description="Metering unit used settings") + __properties = ["unit_name", "aggregate_usage", "display_name", "description", "id", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnit: + """Create an instance of MeteringUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnit: + """Create an instance of MeteringUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnit.parse_obj(obj) + + _obj = MeteringUnit.parse_obj({ + "unit_name": obj.get("unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "id": obj.get("id"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_count.py b/test/pricing/models/metering_unit_count.py new file mode 100644 index 0000000..70836ef --- /dev/null +++ b/test/pricing/models/metering_unit_count.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt + +class MeteringUnitCount(BaseModel): + """ + MeteringUnitCount + """ + timestamp: StrictInt = Field(..., description="Timestamp") + count: StrictInt = Field(..., description="Count") + __properties = ["timestamp", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitCount: + """Create an instance of MeteringUnitCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitCount: + """Create an instance of MeteringUnitCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitCount.parse_obj(obj) + + _obj = MeteringUnitCount.parse_obj({ + "timestamp": obj.get("timestamp"), + "count": obj.get("count") + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_date_count.py b/test/pricing/models/metering_unit_date_count.py new file mode 100644 index 0000000..57da20f --- /dev/null +++ b/test/pricing/models/metering_unit_date_count.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class MeteringUnitDateCount(BaseModel): + """ + MeteringUnitDateCount + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + var_date: StrictStr = Field(..., alias="date", description="Date") + count: StrictInt = Field(..., description="Count") + __properties = ["metering_unit_name", "date", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitDateCount: + """Create an instance of MeteringUnitDateCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitDateCount: + """Create an instance of MeteringUnitDateCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitDateCount.parse_obj(obj) + + _obj = MeteringUnitDateCount.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "var_date": obj.get("date"), + "count": obj.get("count") + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_date_counts.py b/test/pricing/models/metering_unit_date_counts.py new file mode 100644 index 0000000..a536599 --- /dev/null +++ b/test/pricing/models/metering_unit_date_counts.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.metering_unit_date_count import MeteringUnitDateCount +from typing_extensions import Annotated + +class MeteringUnitDateCounts(BaseModel): + """ + MeteringUnitDateCounts + """ + counts: Annotated[List[MeteringUnitDateCount], Field()] = Field(...) + __properties = ["counts"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitDateCounts: + """Create an instance of MeteringUnitDateCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in counts (list) + _items = [] + if self.counts: + for _item in self.counts: + if _item: + _items.append(_item.to_dict()) + _dict['counts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitDateCounts: + """Create an instance of MeteringUnitDateCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitDateCounts.parse_obj(obj) + + _obj = MeteringUnitDateCounts.parse_obj({ + "counts": [MeteringUnitDateCount.from_dict(_item) for _item in obj.get("counts")] if obj.get("counts") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_date_period_counts.py b/test/pricing/models/metering_unit_date_period_counts.py new file mode 100644 index 0000000..d6eb4bd --- /dev/null +++ b/test/pricing/models/metering_unit_date_period_counts.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.pricing.models.metering_unit_count import MeteringUnitCount +from typing_extensions import Annotated + +class MeteringUnitDatePeriodCounts(BaseModel): + """ + MeteringUnitDatePeriodCounts + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + counts: Annotated[List[MeteringUnitCount], Field()] = Field(...) + __properties = ["metering_unit_name", "counts"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitDatePeriodCounts: + """Create an instance of MeteringUnitDatePeriodCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in counts (list) + _items = [] + if self.counts: + for _item in self.counts: + if _item: + _items.append(_item.to_dict()) + _dict['counts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitDatePeriodCounts: + """Create an instance of MeteringUnitDatePeriodCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitDatePeriodCounts.parse_obj(obj) + + _obj = MeteringUnitDatePeriodCounts.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "counts": [MeteringUnitCount.from_dict(_item) for _item in obj.get("counts")] if obj.get("counts") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_month_count.py b/test/pricing/models/metering_unit_month_count.py new file mode 100644 index 0000000..070e5f9 --- /dev/null +++ b/test/pricing/models/metering_unit_month_count.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class MeteringUnitMonthCount(BaseModel): + """ + MeteringUnitMonthCount + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + month: StrictStr = Field(..., description="Month") + count: StrictInt = Field(..., description="Count") + __properties = ["metering_unit_name", "month", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitMonthCount: + """Create an instance of MeteringUnitMonthCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitMonthCount: + """Create an instance of MeteringUnitMonthCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitMonthCount.parse_obj(obj) + + _obj = MeteringUnitMonthCount.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "month": obj.get("month"), + "count": obj.get("count") + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_month_counts.py b/test/pricing/models/metering_unit_month_counts.py new file mode 100644 index 0000000..745213e --- /dev/null +++ b/test/pricing/models/metering_unit_month_counts.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.metering_unit_month_count import MeteringUnitMonthCount +from typing_extensions import Annotated + +class MeteringUnitMonthCounts(BaseModel): + """ + MeteringUnitMonthCounts + """ + counts: Annotated[List[MeteringUnitMonthCount], Field()] = Field(...) + __properties = ["counts"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitMonthCounts: + """Create an instance of MeteringUnitMonthCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in counts (list) + _items = [] + if self.counts: + for _item in self.counts: + if _item: + _items.append(_item.to_dict()) + _dict['counts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitMonthCounts: + """Create an instance of MeteringUnitMonthCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitMonthCounts.parse_obj(obj) + + _obj = MeteringUnitMonthCounts.parse_obj({ + "counts": [MeteringUnitMonthCount.from_dict(_item) for _item in obj.get("counts")] if obj.get("counts") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_props.py b/test/pricing/models/metering_unit_props.py new file mode 100644 index 0000000..a10e950 --- /dev/null +++ b/test/pricing/models/metering_unit_props.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage + +class MeteringUnitProps(BaseModel): + """ + MeteringUnitProps + """ + unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + display_name: StrictStr = Field(..., description="Display name") + description: StrictStr = Field(..., description="Description") + __properties = ["unit_name", "aggregate_usage", "display_name", "description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitProps: + """Create an instance of MeteringUnitProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitProps: + """Create an instance of MeteringUnitProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitProps.parse_obj(obj) + + _obj = MeteringUnitProps.parse_obj({ + "unit_name": obj.get("unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "display_name": obj.get("display_name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/test/pricing/models/metering_unit_timestamp_count.py b/test/pricing/models/metering_unit_timestamp_count.py new file mode 100644 index 0000000..fdab216 --- /dev/null +++ b/test/pricing/models/metering_unit_timestamp_count.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr + +class MeteringUnitTimestampCount(BaseModel): + """ + MeteringUnitTimestampCount + """ + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + timestamp: StrictInt = Field(..., description="Timestamp") + count: StrictInt = Field(..., description="Count") + __properties = ["metering_unit_name", "timestamp", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnitTimestampCount: + """Create an instance of MeteringUnitTimestampCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnitTimestampCount: + """Create an instance of MeteringUnitTimestampCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnitTimestampCount.parse_obj(obj) + + _obj = MeteringUnitTimestampCount.parse_obj({ + "metering_unit_name": obj.get("metering_unit_name"), + "timestamp": obj.get("timestamp"), + "count": obj.get("count") + }) + return _obj + + diff --git a/test/pricing/models/metering_units.py b/test/pricing/models/metering_units.py new file mode 100644 index 0000000..5e1553f --- /dev/null +++ b/test/pricing/models/metering_units.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.metering_unit import MeteringUnit +from typing_extensions import Annotated + +class MeteringUnits(BaseModel): + """ + MeteringUnits + """ + units: Annotated[List[MeteringUnit], Field()] = Field(...) + __properties = ["units"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MeteringUnits: + """Create an instance of MeteringUnits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MeteringUnits: + """Create an instance of MeteringUnits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MeteringUnits.parse_obj(obj) + + _obj = MeteringUnits.parse_obj({ + "units": [MeteringUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/pricing_fixed_unit.py b/test/pricing/models/pricing_fixed_unit.py new file mode 100644 index 0000000..3f2cb9f --- /dev/null +++ b/test/pricing/models/pricing_fixed_unit.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingFixedUnit(BaseModel): + """ + PricingFixedUnit + """ + unit_amount: StrictInt = Field(..., description="Price") + recurring_interval: RecurringInterval = Field(...) + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + used: StrictBool = Field(...) + __properties = ["unit_amount", "recurring_interval", "name", "display_name", "description", "type", "currency", "id", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingFixedUnit: + """Create an instance of PricingFixedUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingFixedUnit: + """Create an instance of PricingFixedUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingFixedUnit.parse_obj(obj) + + _obj = PricingFixedUnit.parse_obj({ + "unit_amount": obj.get("unit_amount"), + "recurring_interval": obj.get("recurring_interval"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "id": obj.get("id"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/pricing_fixed_unit_for_save.py b/test/pricing/models/pricing_fixed_unit_for_save.py new file mode 100644 index 0000000..643095a --- /dev/null +++ b/test/pricing/models/pricing_fixed_unit_for_save.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingFixedUnitForSave(BaseModel): + """ + PricingFixedUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + unit_amount: StrictInt = Field(..., description="Price") + recurring_interval: RecurringInterval = Field(...) + __properties = ["name", "display_name", "description", "type", "currency", "unit_amount", "recurring_interval"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingFixedUnitForSave: + """Create an instance of PricingFixedUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingFixedUnitForSave: + """Create an instance of PricingFixedUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingFixedUnitForSave.parse_obj(obj) + + _obj = PricingFixedUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "unit_amount": obj.get("unit_amount"), + "recurring_interval": obj.get("recurring_interval") + }) + return _obj + + diff --git a/test/pricing/models/pricing_menu.py b/test/pricing/models/pricing_menu.py new file mode 100644 index 0000000..f2b0e0b --- /dev/null +++ b/test/pricing/models/pricing_menu.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from typing_extensions import Annotated + +class PricingMenu(BaseModel): + """ + PricingMenu + """ + name: StrictStr = Field(..., description="Menu name") + display_name: StrictStr = Field(..., description="Menu display name") + description: StrictStr = Field(..., description="Menu description") + used: StrictBool = Field(..., description="Menu used settings") + units: Annotated[List[PricingUnit], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + __properties = ["name", "display_name", "description", "used", "units", "id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingMenu: + """Create an instance of PricingMenu from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingMenu: + """Create an instance of PricingMenu from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingMenu.parse_obj(obj) + + _obj = PricingMenu.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used"), + "units": [PricingUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None, + "id": obj.get("id") + }) + return _obj + + diff --git a/test/pricing/models/pricing_menu_props.py b/test/pricing/models/pricing_menu_props.py new file mode 100644 index 0000000..b88a553 --- /dev/null +++ b/test/pricing/models/pricing_menu_props.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from typing_extensions import Annotated + +class PricingMenuProps(BaseModel): + """ + PricingMenuProps + """ + units: Annotated[List[PricingUnit], Field()] = Field(...) + name: StrictStr = Field(..., description="Menu name") + display_name: StrictStr = Field(..., description="Menu display name") + description: StrictStr = Field(..., description="Menu description") + used: StrictBool = Field(..., description="Menu used settings") + __properties = ["units", "name", "display_name", "description", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingMenuProps: + """Create an instance of PricingMenuProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingMenuProps: + """Create an instance of PricingMenuProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingMenuProps.parse_obj(obj) + + _obj = PricingMenuProps.parse_obj({ + "units": [PricingUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None, + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/pricing_menus.py b/test/pricing/models/pricing_menus.py new file mode 100644 index 0000000..369f188 --- /dev/null +++ b/test/pricing/models/pricing_menus.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from typing_extensions import Annotated + +class PricingMenus(BaseModel): + """ + PricingMenus + """ + pricing_menus: Annotated[List[PricingMenu], Field()] = Field(...) + __properties = ["pricing_menus"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingMenus: + """Create an instance of PricingMenus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_menus (list) + _items = [] + if self.pricing_menus: + for _item in self.pricing_menus: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_menus'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingMenus: + """Create an instance of PricingMenus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingMenus.parse_obj(obj) + + _obj = PricingMenus.parse_obj({ + "pricing_menus": [PricingMenu.from_dict(_item) for _item in obj.get("pricing_menus")] if obj.get("pricing_menus") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/pricing_plan.py b/test/pricing/models/pricing_plan.py new file mode 100644 index 0000000..b620167 --- /dev/null +++ b/test/pricing/models/pricing_plan.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from typing_extensions import Annotated + +class PricingPlan(BaseModel): + """ + PricingPlan + """ + name: StrictStr = Field(..., description="Pricing plan name") + display_name: StrictStr = Field(..., description="Pricing plan display name") + description: StrictStr = Field(..., description="Pricing plan description") + used: StrictBool = Field(..., description="Pricing plan used settings") + pricing_menus: Annotated[List[PricingMenu], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + __properties = ["name", "display_name", "description", "used", "pricing_menus", "id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingPlan: + """Create an instance of PricingPlan from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_menus (list) + _items = [] + if self.pricing_menus: + for _item in self.pricing_menus: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_menus'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingPlan: + """Create an instance of PricingPlan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingPlan.parse_obj(obj) + + _obj = PricingPlan.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used"), + "pricing_menus": [PricingMenu.from_dict(_item) for _item in obj.get("pricing_menus")] if obj.get("pricing_menus") is not None else None, + "id": obj.get("id") + }) + return _obj + + diff --git a/test/pricing/models/pricing_plan_props.py b/test/pricing/models/pricing_plan_props.py new file mode 100644 index 0000000..b0ae798 --- /dev/null +++ b/test/pricing/models/pricing_plan_props.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictStr +from saasus_sdk_python.src.pricing.models.pricing_menu import PricingMenu +from typing_extensions import Annotated + +class PricingPlanProps(BaseModel): + """ + PricingPlanProps + """ + pricing_menus: Annotated[List[PricingMenu], Field()] = Field(...) + name: StrictStr = Field(..., description="Pricing plan name") + display_name: StrictStr = Field(..., description="Pricing plan display name") + description: StrictStr = Field(..., description="Pricing plan description") + used: StrictBool = Field(..., description="Pricing plan used settings") + __properties = ["pricing_menus", "name", "display_name", "description", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingPlanProps: + """Create an instance of PricingPlanProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_menus (list) + _items = [] + if self.pricing_menus: + for _item in self.pricing_menus: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_menus'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingPlanProps: + """Create an instance of PricingPlanProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingPlanProps.parse_obj(obj) + + _obj = PricingPlanProps.parse_obj({ + "pricing_menus": [PricingMenu.from_dict(_item) for _item in obj.get("pricing_menus")] if obj.get("pricing_menus") is not None else None, + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/pricing_plans.py b/test/pricing/models/pricing_plans.py new file mode 100644 index 0000000..80e7cdc --- /dev/null +++ b/test/pricing/models/pricing_plans.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_plan import PricingPlan +from typing_extensions import Annotated + +class PricingPlans(BaseModel): + """ + PricingPlans + """ + pricing_plans: Annotated[List[PricingPlan], Field()] = Field(...) + __properties = ["pricing_plans"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingPlans: + """Create an instance of PricingPlans from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in pricing_plans (list) + _items = [] + if self.pricing_plans: + for _item in self.pricing_plans: + if _item: + _items.append(_item.to_dict()) + _dict['pricing_plans'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingPlans: + """Create an instance of PricingPlans from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingPlans.parse_obj(obj) + + _obj = PricingPlans.parse_obj({ + "pricing_plans": [PricingPlan.from_dict(_item) for _item in obj.get("pricing_plans")] if obj.get("pricing_plans") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/pricing_tier.py b/test/pricing/models/pricing_tier.py new file mode 100644 index 0000000..45ce38f --- /dev/null +++ b/test/pricing/models/pricing_tier.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictBool, StrictInt + +class PricingTier(BaseModel): + """ + PricingTier + """ + up_to: StrictInt = Field(..., description="Upper limit") + unit_amount: StrictInt = Field(..., description="Amount per unit") + flat_amount: StrictInt = Field(..., description="Fixed amount") + inf: StrictBool = Field(..., description="Indefinite") + __properties = ["up_to", "unit_amount", "flat_amount", "inf"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTier: + """Create an instance of PricingTier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTier: + """Create an instance of PricingTier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTier.parse_obj(obj) + + _obj = PricingTier.parse_obj({ + "up_to": obj.get("up_to"), + "unit_amount": obj.get("unit_amount"), + "flat_amount": obj.get("flat_amount"), + "inf": obj.get("inf") + }) + return _obj + + diff --git a/test/pricing/models/pricing_tiered_unit.py b/test/pricing/models/pricing_tiered_unit.py new file mode 100644 index 0000000..47e8d5f --- /dev/null +++ b/test/pricing/models/pricing_tiered_unit.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUnit(BaseModel): + """ + PricingTieredUnit + """ + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + metering_unit_id: StrictStr = Field(..., description="Universally Unique Identifier") + recurring_interval: RecurringInterval = Field(...) + used: StrictBool = Field(..., description="Indicates if the unit is used") + __properties = ["upper_count", "metering_unit_name", "aggregate_usage", "name", "display_name", "description", "type", "currency", "tiers", "id", "metering_unit_id", "recurring_interval", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUnit: + """Create an instance of PricingTieredUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUnit: + """Create an instance of PricingTieredUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUnit.parse_obj(obj) + + _obj = PricingTieredUnit.parse_obj({ + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "id": obj.get("id"), + "metering_unit_id": obj.get("metering_unit_id"), + "recurring_interval": obj.get("recurring_interval"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/pricing_tiered_unit_for_save.py b/test/pricing/models/pricing_tiered_unit_for_save.py new file mode 100644 index 0000000..40b4e63 --- /dev/null +++ b/test/pricing/models/pricing_tiered_unit_for_save.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUnitForSave(BaseModel): + """ + PricingTieredUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + __properties = ["name", "display_name", "description", "type", "currency", "tiers", "upper_count", "metering_unit_name", "aggregate_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUnitForSave: + """Create an instance of PricingTieredUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUnitForSave: + """Create an instance of PricingTieredUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUnitForSave.parse_obj(obj) + + _obj = PricingTieredUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage") + }) + return _obj + + diff --git a/test/pricing/models/pricing_tiered_usage_unit.py b/test/pricing/models/pricing_tiered_usage_unit.py new file mode 100644 index 0000000..2b354af --- /dev/null +++ b/test/pricing/models/pricing_tiered_usage_unit.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUsageUnit(BaseModel): + """ + PricingTieredUsageUnit + """ + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + metering_unit_id: StrictStr = Field(..., description="Universally Unique Identifier") + recurring_interval: RecurringInterval = Field(...) + used: StrictBool = Field(..., description="Indicates if the unit is used") + __properties = ["upper_count", "metering_unit_name", "aggregate_usage", "name", "display_name", "description", "type", "currency", "tiers", "id", "metering_unit_id", "recurring_interval", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUsageUnit: + """Create an instance of PricingTieredUsageUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUsageUnit: + """Create an instance of PricingTieredUsageUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUsageUnit.parse_obj(obj) + + _obj = PricingTieredUsageUnit.parse_obj({ + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "id": obj.get("id"), + "metering_unit_id": obj.get("metering_unit_id"), + "recurring_interval": obj.get("recurring_interval"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/pricing_tiered_usage_unit_for_save.py b/test/pricing/models/pricing_tiered_usage_unit_for_save.py new file mode 100644 index 0000000..9c4efa6 --- /dev/null +++ b/test/pricing/models/pricing_tiered_usage_unit_for_save.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List, Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from saasus_sdk_python.src.pricing.models.unit_type import UnitType +from typing_extensions import Annotated + +class PricingTieredUsageUnitForSave(BaseModel): + """ + PricingTieredUsageUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + tiers: Annotated[List[PricingTier], Field()] = Field(...) + upper_count: StrictInt = Field(..., description="Upper limit") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + __properties = ["name", "display_name", "description", "type", "currency", "tiers", "upper_count", "metering_unit_name", "aggregate_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTieredUsageUnitForSave: + """Create an instance of PricingTieredUsageUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTieredUsageUnitForSave: + """Create an instance of PricingTieredUsageUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTieredUsageUnitForSave.parse_obj(obj) + + _obj = PricingTieredUsageUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None, + "upper_count": obj.get("upper_count"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage") + }) + return _obj + + diff --git a/test/pricing/models/pricing_tiers.py b/test/pricing/models/pricing_tiers.py new file mode 100644 index 0000000..03f9c67 --- /dev/null +++ b/test/pricing/models/pricing_tiers.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_tier import PricingTier +from typing_extensions import Annotated + +class PricingTiers(BaseModel): + """ + PricingTiers + """ + tiers: Annotated[List[PricingTier], Field()] = Field(...) + __properties = ["tiers"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingTiers: + """Create an instance of PricingTiers from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tiers (list) + _items = [] + if self.tiers: + for _item in self.tiers: + if _item: + _items.append(_item.to_dict()) + _dict['tiers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingTiers: + """Create an instance of PricingTiers from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingTiers.parse_obj(obj) + + _obj = PricingTiers.parse_obj({ + "tiers": [PricingTier.from_dict(_item) for _item in obj.get("tiers")] if obj.get("tiers") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/pricing_unit.py b/test/pricing/models/pricing_unit.py new file mode 100644 index 0000000..acc8157 --- /dev/null +++ b/test/pricing/models/pricing_unit.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Literal, Any, List, Optional +from pydantic import field_validator, ConfigDict, BaseModel, StrictStr, ValidationError +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit import PricingFixedUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit import PricingTieredUnit +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit import PricingTieredUsageUnit +from saasus_sdk_python.src.pricing.models.pricing_usage_unit import PricingUsageUnit +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr + +PRICINGUNIT_ONE_OF_SCHEMAS = ["PricingFixedUnit", "PricingTieredUnit", "PricingTieredUsageUnit", "PricingUsageUnit"] + +class PricingUnit(BaseModel): + """ + PricingUnit + """ + # data type: PricingTieredUsageUnit + oneof_schema_1_validator: Optional[PricingTieredUsageUnit] = None + # data type: PricingTieredUnit + oneof_schema_2_validator: Optional[PricingTieredUnit] = None + # data type: PricingUsageUnit + oneof_schema_3_validator: Optional[PricingUsageUnit] = None + # data type: PricingFixedUnit + oneof_schema_4_validator: Optional[PricingFixedUnit] = None + if TYPE_CHECKING: + actual_instance: Union[PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit] + else: + actual_instance: Any = None + one_of_schemas: Literal[PRICINGUNIT_ONE_OF_SCHEMAS] = PRICINGUNIT_ONE_OF_SCHEMAS + model_config = ConfigDict(validate_assignment=True) + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + @classmethod + def actual_instance_must_validate_oneof(cls, v): + instance = PricingUnit.construct() + error_messages = [] + match = 0 + # validate data type: PricingTieredUsageUnit + if not isinstance(v, PricingTieredUsageUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUsageUnit`") + else: + match += 1 + # validate data type: PricingTieredUnit + if not isinstance(v, PricingTieredUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUnit`") + else: + match += 1 + # validate data type: PricingUsageUnit + if not isinstance(v, PricingUsageUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingUsageUnit`") + else: + match += 1 + # validate data type: PricingFixedUnit + if not isinstance(v, PricingFixedUnit): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingFixedUnit`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnit: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnit: + """Returns the object represented by the json string""" + instance = PricingUnit.construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `PricingFixedUnit` + if _data_type == "PricingFixedUnit": + instance.actual_instance = PricingFixedUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnit` + if _data_type == "PricingTieredUnit": + instance.actual_instance = PricingTieredUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnit` + if _data_type == "PricingTieredUsageUnit": + instance.actual_instance = PricingTieredUsageUnit.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnit` + if _data_type == "PricingUsageUnit": + instance.actual_instance = PricingUsageUnit.from_json(json_str) + return instance + + # check if data type is `PricingFixedUnit` + if _data_type == "fixed": + instance.actual_instance = PricingFixedUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnit` + if _data_type == "tiered": + instance.actual_instance = PricingTieredUnit.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnit` + if _data_type == "tiered_usage": + instance.actual_instance = PricingTieredUsageUnit.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnit` + if _data_type == "usage": + instance.actual_instance = PricingUsageUnit.from_json(json_str) + return instance + + # deserialize data into PricingTieredUsageUnit + try: + instance.actual_instance = PricingTieredUsageUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingTieredUnit + try: + instance.actual_instance = PricingTieredUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingUsageUnit + try: + instance.actual_instance = PricingUsageUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingFixedUnit + try: + instance.actual_instance = PricingFixedUnit.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PricingUnit with oneOf schemas: PricingFixedUnit, PricingTieredUnit, PricingTieredUsageUnit, PricingUsageUnit. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/test/pricing/models/pricing_unit_base_props.py b/test/pricing/models/pricing_unit_base_props.py new file mode 100644 index 0000000..80ceb7f --- /dev/null +++ b/test/pricing/models/pricing_unit_base_props.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingUnitBaseProps(BaseModel): + """ + PricingUnitBaseProps + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + __properties = ["name", "display_name", "description", "type", "currency"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnitBaseProps: + """Create an instance of PricingUnitBaseProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnitBaseProps: + """Create an instance of PricingUnitBaseProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUnitBaseProps.parse_obj(obj) + + _obj = PricingUnitBaseProps.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency") + }) + return _obj + + diff --git a/test/pricing/models/pricing_unit_for_save.py b/test/pricing/models/pricing_unit_for_save.py new file mode 100644 index 0000000..fe16093 --- /dev/null +++ b/test/pricing/models/pricing_unit_for_save.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Literal, Any, List, Optional +from pydantic import field_validator, ConfigDict, BaseModel, StrictStr, ValidationError +from saasus_sdk_python.src.pricing.models.pricing_fixed_unit_for_save import PricingFixedUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_unit_for_save import PricingTieredUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_tiered_usage_unit_for_save import PricingTieredUsageUnitForSave +from saasus_sdk_python.src.pricing.models.pricing_usage_unit_for_save import PricingUsageUnitForSave +from typing import Union, Any, List, TYPE_CHECKING, Dict +from pydantic import StrictStr + +PRICINGUNITFORSAVE_ONE_OF_SCHEMAS = ["PricingFixedUnitForSave", "PricingTieredUnitForSave", "PricingTieredUsageUnitForSave", "PricingUsageUnitForSave"] + +class PricingUnitForSave(BaseModel): + """ + PricingUnitForSave + """ + # data type: PricingTieredUsageUnitForSave + oneof_schema_1_validator: Optional[PricingTieredUsageUnitForSave] = None + # data type: PricingTieredUnitForSave + oneof_schema_2_validator: Optional[PricingTieredUnitForSave] = None + # data type: PricingUsageUnitForSave + oneof_schema_3_validator: Optional[PricingUsageUnitForSave] = None + # data type: PricingFixedUnitForSave + oneof_schema_4_validator: Optional[PricingFixedUnitForSave] = None + if TYPE_CHECKING: + actual_instance: Union[PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave] + else: + actual_instance: Any = None + one_of_schemas: Literal[PRICINGUNITFORSAVE_ONE_OF_SCHEMAS] = PRICINGUNITFORSAVE_ONE_OF_SCHEMAS + model_config = ConfigDict(validate_assignment=True) + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + @classmethod + def actual_instance_must_validate_oneof(cls, v): + instance = PricingUnitForSave.construct() + error_messages = [] + match = 0 + # validate data type: PricingTieredUsageUnitForSave + if not isinstance(v, PricingTieredUsageUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUsageUnitForSave`") + else: + match += 1 + # validate data type: PricingTieredUnitForSave + if not isinstance(v, PricingTieredUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingTieredUnitForSave`") + else: + match += 1 + # validate data type: PricingUsageUnitForSave + if not isinstance(v, PricingUsageUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingUsageUnitForSave`") + else: + match += 1 + # validate data type: PricingFixedUnitForSave + if not isinstance(v, PricingFixedUnitForSave): + error_messages.append(f"Error! Input type `{type(v)}` is not `PricingFixedUnitForSave`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnitForSave: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnitForSave: + """Returns the object represented by the json string""" + instance = PricingUnitForSave.construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `PricingFixedUnitForSave` + if _data_type == "PricingFixedUnitForSave": + instance.actual_instance = PricingFixedUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnitForSave` + if _data_type == "PricingTieredUnitForSave": + instance.actual_instance = PricingTieredUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnitForSave` + if _data_type == "PricingTieredUsageUnitForSave": + instance.actual_instance = PricingTieredUsageUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnitForSave` + if _data_type == "PricingUsageUnitForSave": + instance.actual_instance = PricingUsageUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingFixedUnitForSave` + if _data_type == "fixed": + instance.actual_instance = PricingFixedUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUnitForSave` + if _data_type == "tiered": + instance.actual_instance = PricingTieredUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingTieredUsageUnitForSave` + if _data_type == "tiered_usage": + instance.actual_instance = PricingTieredUsageUnitForSave.from_json(json_str) + return instance + + # check if data type is `PricingUsageUnitForSave` + if _data_type == "usage": + instance.actual_instance = PricingUsageUnitForSave.from_json(json_str) + return instance + + # deserialize data into PricingTieredUsageUnitForSave + try: + instance.actual_instance = PricingTieredUsageUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingTieredUnitForSave + try: + instance.actual_instance = PricingTieredUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingUsageUnitForSave + try: + instance.actual_instance = PricingUsageUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PricingFixedUnitForSave + try: + instance.actual_instance = PricingFixedUnitForSave.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PricingUnitForSave with oneOf schemas: PricingFixedUnitForSave, PricingTieredUnitForSave, PricingTieredUsageUnitForSave, PricingUsageUnitForSave. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + + diff --git a/test/pricing/models/pricing_units.py b/test/pricing/models/pricing_units.py new file mode 100644 index 0000000..4b05059 --- /dev/null +++ b/test/pricing/models/pricing_units.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.pricing_unit import PricingUnit +from typing_extensions import Annotated + +class PricingUnits(BaseModel): + """ + PricingUnits + """ + units: Annotated[List[PricingUnit], Field()] = Field(...) + __properties = ["units"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUnits: + """Create an instance of PricingUnits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in units (list) + _items = [] + if self.units: + for _item in self.units: + if _item: + _items.append(_item.to_dict()) + _dict['units'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUnits: + """Create an instance of PricingUnits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUnits.parse_obj(obj) + + _obj = PricingUnits.parse_obj({ + "units": [PricingUnit.from_dict(_item) for _item in obj.get("units")] if obj.get("units") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/pricing_usage_unit.py b/test/pricing/models/pricing_usage_unit.py new file mode 100644 index 0000000..d03cc7b --- /dev/null +++ b/test/pricing/models/pricing_usage_unit.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictBool, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.recurring_interval import RecurringInterval +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingUsageUnit(BaseModel): + """ + PricingUsageUnit + """ + upper_count: StrictInt = Field(..., description="Upper limit") + unit_amount: StrictInt = Field(..., description="Amount per usage") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + id: StrictStr = Field(..., description="Universally Unique Identifier") + metering_unit_id: StrictStr = Field(..., description="Universally Unique Identifier") + recurring_interval: RecurringInterval = Field(...) + used: StrictBool = Field(...) + __properties = ["upper_count", "unit_amount", "metering_unit_name", "aggregate_usage", "name", "display_name", "description", "type", "currency", "id", "metering_unit_id", "recurring_interval", "used"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUsageUnit: + """Create an instance of PricingUsageUnit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUsageUnit: + """Create an instance of PricingUsageUnit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUsageUnit.parse_obj(obj) + + _obj = PricingUsageUnit.parse_obj({ + "upper_count": obj.get("upper_count"), + "unit_amount": obj.get("unit_amount"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage"), + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "id": obj.get("id"), + "metering_unit_id": obj.get("metering_unit_id"), + "recurring_interval": obj.get("recurring_interval"), + "used": obj.get("used") + }) + return _obj + + diff --git a/test/pricing/models/pricing_usage_unit_for_save.py b/test/pricing/models/pricing_usage_unit_for_save.py new file mode 100644 index 0000000..c704884 --- /dev/null +++ b/test/pricing/models/pricing_usage_unit_for_save.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Optional +from pydantic import ConfigDict, BaseModel, Field, StrictInt, StrictStr +from saasus_sdk_python.src.pricing.models.aggregate_usage import AggregateUsage +from saasus_sdk_python.src.pricing.models.currency import Currency +from saasus_sdk_python.src.pricing.models.unit_type import UnitType + +class PricingUsageUnitForSave(BaseModel): + """ + PricingUsageUnitForSave + """ + name: StrictStr = Field(..., description="Name") + display_name: StrictStr = Field(..., description="Display Name") + description: StrictStr = Field(..., description="Description") + type: UnitType = Field(...) + currency: Currency = Field(...) + upper_count: StrictInt = Field(..., description="Upper limit") + unit_amount: StrictInt = Field(..., description="Amount per usage") + metering_unit_name: StrictStr = Field(..., description="Metering unit name") + aggregate_usage: Optional[AggregateUsage] = None + __properties = ["name", "display_name", "description", "type", "currency", "upper_count", "unit_amount", "metering_unit_name", "aggregate_usage"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> PricingUsageUnitForSave: + """Create an instance of PricingUsageUnitForSave from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> PricingUsageUnitForSave: + """Create an instance of PricingUsageUnitForSave from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PricingUsageUnitForSave.parse_obj(obj) + + _obj = PricingUsageUnitForSave.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "type": obj.get("type"), + "currency": obj.get("currency"), + "upper_count": obj.get("upper_count"), + "unit_amount": obj.get("unit_amount"), + "metering_unit_name": obj.get("metering_unit_name"), + "aggregate_usage": obj.get("aggregate_usage") + }) + return _obj + + diff --git a/test/pricing/models/recurring_interval.py b/test/pricing/models/recurring_interval.py new file mode 100644 index 0000000..47cadc0 --- /dev/null +++ b/test/pricing/models/recurring_interval.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class RecurringInterval(str, Enum): + """ + Cycle month: Monthly year: Yearly + """ + + """ + allowed enum values + """ + MONTH = 'month' + YEAR = 'year' + + @classmethod + def from_json(cls, json_str: str) -> RecurringInterval: + """Create an instance of RecurringInterval from a JSON string""" + return RecurringInterval(json.loads(json_str)) + + diff --git a/test/pricing/models/save_pricing_menu_param.py b/test/pricing/models/save_pricing_menu_param.py new file mode 100644 index 0000000..0583d5a --- /dev/null +++ b/test/pricing/models/save_pricing_menu_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class SavePricingMenuParam(BaseModel): + """ + SavePricingMenuParam + """ + name: StrictStr = Field(..., description="Menu name") + display_name: StrictStr = Field(..., description="Menu display name") + description: StrictStr = Field(..., description="Menu description") + unit_ids: Annotated[List[StrictStr], Field()] = Field(..., description="Unit IDs to add") + __properties = ["name", "display_name", "description", "unit_ids"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SavePricingMenuParam: + """Create an instance of SavePricingMenuParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SavePricingMenuParam: + """Create an instance of SavePricingMenuParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SavePricingMenuParam.parse_obj(obj) + + _obj = SavePricingMenuParam.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "unit_ids": obj.get("unit_ids") + }) + return _obj + + diff --git a/test/pricing/models/save_pricing_plan_param.py b/test/pricing/models/save_pricing_plan_param.py new file mode 100644 index 0000000..eb65bb8 --- /dev/null +++ b/test/pricing/models/save_pricing_plan_param.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class SavePricingPlanParam(BaseModel): + """ + SavePricingPlanParam + """ + name: StrictStr = Field(..., description="Pricing plan name") + display_name: StrictStr = Field(..., description="Pricing plan display name") + description: StrictStr = Field(..., description="Pricing plan description") + menu_ids: Annotated[List[StrictStr], Field()] = Field(..., description="Menu ID to be added to the pricing plan") + __properties = ["name", "display_name", "description", "menu_ids"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> SavePricingPlanParam: + """Create an instance of SavePricingPlanParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> SavePricingPlanParam: + """Create an instance of SavePricingPlanParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SavePricingPlanParam.parse_obj(obj) + + _obj = SavePricingPlanParam.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "description": obj.get("description"), + "menu_ids": obj.get("menu_ids") + }) + return _obj + + diff --git a/test/pricing/models/tax_rate.py b/test/pricing/models/tax_rate.py new file mode 100644 index 0000000..b96913b --- /dev/null +++ b/test/pricing/models/tax_rate.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Union +from pydantic import field_validator, StringConstraints, ConfigDict, BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing_extensions import Annotated + +class TaxRate(BaseModel): + """ + TaxRate + """ + name: StrictStr = Field(..., description="Name of tax rate") + display_name: StrictStr = Field(..., description="Display name") + percentage: Union[StrictFloat, StrictInt] = Field(..., description="Percentage") + inclusive: StrictBool = Field(..., description="Inclusive or not") + country: Annotated[str, StringConstraints(strict=True)] = Field(..., description="Country code of ISO 3166-1 alpha-2") + description: StrictStr = Field(..., description="Description") + id: StrictStr = Field(..., description="Universally Unique Identifier") + __properties = ["name", "display_name", "percentage", "inclusive", "country", "description", "id"] + + @field_validator('country') + @classmethod + def country_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z]{2}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TaxRate: + """Create an instance of TaxRate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaxRate: + """Create an instance of TaxRate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TaxRate.parse_obj(obj) + + _obj = TaxRate.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "percentage": obj.get("percentage"), + "inclusive": obj.get("inclusive"), + "country": obj.get("country"), + "description": obj.get("description"), + "id": obj.get("id") + }) + return _obj + + diff --git a/test/pricing/models/tax_rate_props.py b/test/pricing/models/tax_rate_props.py new file mode 100644 index 0000000..8d2cbb8 --- /dev/null +++ b/test/pricing/models/tax_rate_props.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import Union +from pydantic import field_validator, StringConstraints, ConfigDict, BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing_extensions import Annotated + +class TaxRateProps(BaseModel): + """ + TaxRateProps + """ + name: StrictStr = Field(..., description="Name of tax rate") + display_name: StrictStr = Field(..., description="Display name") + percentage: Union[StrictFloat, StrictInt] = Field(..., description="Percentage") + inclusive: StrictBool = Field(..., description="Inclusive or not") + country: Annotated[str, StringConstraints(strict=True)] = Field(..., description="Country code of ISO 3166-1 alpha-2") + description: StrictStr = Field(..., description="Description") + __properties = ["name", "display_name", "percentage", "inclusive", "country", "description"] + + @field_validator('country') + @classmethod + def country_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z]{2}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z]{2}$/") + return value + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TaxRateProps: + """Create an instance of TaxRateProps from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaxRateProps: + """Create an instance of TaxRateProps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TaxRateProps.parse_obj(obj) + + _obj = TaxRateProps.parse_obj({ + "name": obj.get("name"), + "display_name": obj.get("display_name"), + "percentage": obj.get("percentage"), + "inclusive": obj.get("inclusive"), + "country": obj.get("country"), + "description": obj.get("description") + }) + return _obj + + diff --git a/test/pricing/models/tax_rates.py b/test/pricing/models/tax_rates.py new file mode 100644 index 0000000..5759e0d --- /dev/null +++ b/test/pricing/models/tax_rates.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field +from saasus_sdk_python.src.pricing.models.tax_rate import TaxRate +from typing_extensions import Annotated + +class TaxRates(BaseModel): + """ + TaxRates + """ + tax_rates: Annotated[List[TaxRate], Field()] = Field(...) + __properties = ["tax_rates"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> TaxRates: + """Create an instance of TaxRates from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in tax_rates (list) + _items = [] + if self.tax_rates: + for _item in self.tax_rates: + if _item: + _items.append(_item.to_dict()) + _dict['tax_rates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> TaxRates: + """Create an instance of TaxRates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return TaxRates.parse_obj(obj) + + _obj = TaxRates.parse_obj({ + "tax_rates": [TaxRate.from_dict(_item) for _item in obj.get("tax_rates")] if obj.get("tax_rates") is not None else None + }) + return _obj + + diff --git a/test/pricing/models/unit_type.py b/test/pricing/models/unit_type.py new file mode 100644 index 0000000..98d3536 --- /dev/null +++ b/test/pricing/models/unit_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class UnitType(str, Enum): + """ + Unit of measurement type fixed: Fixed unit usage: Usage unit tiered: Tiered unit tiered_usage: Tiered usage unit + """ + + """ + allowed enum values + """ + FIXED = 'fixed' + USAGE = 'usage' + TIERED = 'tiered' + TIERED_USAGE = 'tiered_usage' + + @classmethod + def from_json(cls, json_str: str) -> UnitType: + """Create an instance of UnitType from a JSON string""" + return UnitType(json.loads(json_str)) + + diff --git a/test/pricing/models/update_metering_unit_timestamp_count_method.py b/test/pricing/models/update_metering_unit_timestamp_count_method.py new file mode 100644 index 0000000..ad8de80 --- /dev/null +++ b/test/pricing/models/update_metering_unit_timestamp_count_method.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class UpdateMeteringUnitTimestampCountMethod(str, Enum): + """ + Update method add: Addition sub: Subtraction direct: Overwrite + """ + + """ + allowed enum values + """ + ADD = 'add' + SUB = 'sub' + DIRECT = 'direct' + + @classmethod + def from_json(cls, json_str: str) -> UpdateMeteringUnitTimestampCountMethod: + """Create an instance of UpdateMeteringUnitTimestampCountMethod from a JSON string""" + return UpdateMeteringUnitTimestampCountMethod(json.loads(json_str)) + + diff --git a/test/pricing/models/update_metering_unit_timestamp_count_now_param.py b/test/pricing/models/update_metering_unit_timestamp_count_now_param.py new file mode 100644 index 0000000..e589406 --- /dev/null +++ b/test/pricing/models/update_metering_unit_timestamp_count_now_param.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod + +class UpdateMeteringUnitTimestampCountNowParam(BaseModel): + """ + UpdateMeteringUnitTimestampCountNowParam + """ + method: UpdateMeteringUnitTimestampCountMethod = Field(...) + count: StrictInt = Field(..., description="Count") + __properties = ["method", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateMeteringUnitTimestampCountNowParam: + """Create an instance of UpdateMeteringUnitTimestampCountNowParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateMeteringUnitTimestampCountNowParam: + """Create an instance of UpdateMeteringUnitTimestampCountNowParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateMeteringUnitTimestampCountNowParam.parse_obj(obj) + + _obj = UpdateMeteringUnitTimestampCountNowParam.parse_obj({ + "method": obj.get("method"), + "count": obj.get("count") + }) + return _obj + + diff --git a/test/pricing/models/update_metering_unit_timestamp_count_param.py b/test/pricing/models/update_metering_unit_timestamp_count_param.py new file mode 100644 index 0000000..97cc4ea --- /dev/null +++ b/test/pricing/models/update_metering_unit_timestamp_count_param.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictInt +from saasus_sdk_python.src.pricing.models.update_metering_unit_timestamp_count_method import UpdateMeteringUnitTimestampCountMethod + +class UpdateMeteringUnitTimestampCountParam(BaseModel): + """ + UpdateMeteringUnitTimestampCountParam + """ + method: UpdateMeteringUnitTimestampCountMethod = Field(...) + count: StrictInt = Field(..., description="Count") + __properties = ["method", "count"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateMeteringUnitTimestampCountParam: + """Create an instance of UpdateMeteringUnitTimestampCountParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateMeteringUnitTimestampCountParam: + """Create an instance of UpdateMeteringUnitTimestampCountParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateMeteringUnitTimestampCountParam.parse_obj(obj) + + _obj = UpdateMeteringUnitTimestampCountParam.parse_obj({ + "method": obj.get("method"), + "count": obj.get("count") + }) + return _obj + + diff --git a/test/pricing/models/update_pricing_plans_used_param.py b/test/pricing/models/update_pricing_plans_used_param.py new file mode 100644 index 0000000..3700bb4 --- /dev/null +++ b/test/pricing/models/update_pricing_plans_used_param.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 typing import List +from pydantic import ConfigDict, BaseModel, Field, StrictStr +from typing_extensions import Annotated + +class UpdatePricingPlansUsedParam(BaseModel): + """ + UpdatePricingPlansUsedParam + """ + plan_ids: Annotated[List[StrictStr], Field()] = Field(...) + __properties = ["plan_ids"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdatePricingPlansUsedParam: + """Create an instance of UpdatePricingPlansUsedParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdatePricingPlansUsedParam: + """Create an instance of UpdatePricingPlansUsedParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdatePricingPlansUsedParam.parse_obj(obj) + + _obj = UpdatePricingPlansUsedParam.parse_obj({ + "plan_ids": obj.get("plan_ids") + }) + return _obj + + diff --git a/test/pricing/models/update_tax_rate_param.py b/test/pricing/models/update_tax_rate_param.py new file mode 100644 index 0000000..8170440 --- /dev/null +++ b/test/pricing/models/update_tax_rate_param.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + 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 ConfigDict, BaseModel, Field, StrictStr + +class UpdateTaxRateParam(BaseModel): + """ + UpdateTaxRateParam + """ + display_name: StrictStr = Field(..., description="Display name") + description: StrictStr = Field(..., description="Description") + __properties = ["display_name", "description"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> UpdateTaxRateParam: + """Create an instance of UpdateTaxRateParam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> UpdateTaxRateParam: + """Create an instance of UpdateTaxRateParam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return UpdateTaxRateParam.parse_obj(obj) + + _obj = UpdateTaxRateParam.parse_obj({ + "display_name": obj.get("display_name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/test/pricing/py.typed b/test/pricing/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/test/pricing/rest.py b/test/pricing/rest.py new file mode 100644 index 0000000..bfe950f --- /dev/null +++ b/test/pricing/rest.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + SaaSus Pricing API Schema + + SaaSus Pricing API Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import logging +import re +import ssl + +from urllib.parse import urlencode, quote_plus +import urllib3 + +from saasus_sdk_python.src.pricing.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + addition_pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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 + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + # url already contains the URL query string + # so reset query_params to empty dict + query_params = {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int,float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields={}, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 400: + raise BadRequestException(http_resp=r) + + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def get_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def head_request(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def options_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def delete_request(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def post_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def put_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def patch_request(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 0987b6b..0000000 --- a/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=saasus_sdk_python